about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2023-07-03 12:44:34 +0000
committerNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2023-07-03 12:48:52 +0000
commitba0f5dcd143797b73bd20ae235ad491d83b7f457 (patch)
treee93f6ae65cf02ee11538d8d80a6bb8cc51cc0c9d
parent737b4615552741aefcd10124914355392b6b3d80 (diff)
Revert "Suggest `x build library` for a custom toolchain that fails to load `core`"
This reverts commit b913f5593d2e2698d18034b56dd538ee745f1adc.

CI builds with profile=nightly, causing different test output.

Making the output depend on the release channel was not a great idea.
-rw-r--r--compiler/rustc_metadata/messages.ftl3
-rw-r--r--compiler/rustc_metadata/src/errors.rs14
2 files changed, 4 insertions, 13 deletions
diff --git a/compiler/rustc_metadata/messages.ftl b/compiler/rustc_metadata/messages.ftl
index cc58d51befd..13b3dac85d1 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 b6c82376f4e..fca06c0f47c 100644
--- a/compiler/rustc_metadata/src/errors.rs
+++ b/compiler/rustc_metadata/src/errors.rs
@@ -646,18 +646,12 @@ impl IntoDiagnostic<'_> for CannotFindCrate {
             } else {
                 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.
             // NOTE: this is a dummy span if `extern crate std` was injected by the compiler.
             // If it's not a dummy, that means someone added `extern crate std` explicitly and