From f946851ead35a3b17161a12dc7cb3b92d81c84f9 Mon Sep 17 00:00:00 2001 From: Mu001999 Date: Mon, 3 Jul 2023 20:44:36 +0800 Subject: [PATCH] Revert "Suggest x build library for a custom toolchain that fails to load core" --- compiler/rustc_metadata/messages.ftl | 3 --- compiler/rustc_metadata/src/errors.rs | 12 ++++-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/compiler/rustc_metadata/messages.ftl b/compiler/rustc_metadata/messages.ftl index cc58d51befdcf..13b3dac85d109 100644 --- a/compiler/rustc_metadata/messages.ftl +++ b/compiler/rustc_metadata/messages.ftl @@ -25,9 +25,6 @@ metadata_conflicting_alloc_error_handler = metadata_conflicting_global_alloc = the `#[global_allocator]` in {$other_crate_name} conflicts with global allocator in: {$crate_name} -metadata_consider_adding_std = - consider adding the standard library to the sysroot with `x build library --target {$locator_triple}` - metadata_consider_building_std = consider building the standard library from source with `cargo build -Zbuild-std` diff --git a/compiler/rustc_metadata/src/errors.rs b/compiler/rustc_metadata/src/errors.rs index b6c82376f4ee6..635e897264f63 100644 --- a/compiler/rustc_metadata/src/errors.rs +++ b/compiler/rustc_metadata/src/errors.rs @@ -647,15 +647,11 @@ impl IntoDiagnostic<'_> for CannotFindCrate { diag.note(fluent::metadata_target_no_std_support); } + // NOTE: this suggests using rustup, even though the user may not have it installed. + // That's because they could choose to install it; or this may give them a hint which + // target they need to install from their distro. if self.missing_core { - if env!("CFG_RELEASE_CHANNEL") == "dev" { - diag.help(fluent::metadata_consider_adding_std); - } else { - // NOTE: this suggests using rustup, even though the user may not have it installed. - // That's because they could choose to install it; or this may give them a hint which - // target they need to install from their distro. - diag.help(fluent::metadata_consider_downloading_target); - } + diag.help(fluent::metadata_consider_downloading_target); } // Suggest using #![no_std]. #[no_core] is unstable and not really supported anyway.