X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_metadata%2Fsrc%2Flocator.rs;h=8570bf30f80787a7c2ac8bb0a3c13207438c8d40;hb=a81f55fb161a22e287220281d33542406a3a57f8;hp=6e7360950908e9dbd164ff0c7f7ecfebb93f4b91;hpb=38bc9b9933abee088d2416e28f0c2ef9a039e1b9;p=rust.git diff --git a/compiler/rustc_metadata/src/locator.rs b/compiler/rustc_metadata/src/locator.rs index 6e736095090..8570bf30f80 100644 --- a/compiler/rustc_metadata/src/locator.rs +++ b/compiler/rustc_metadata/src/locator.rs @@ -1100,7 +1100,9 @@ impl CrateError { if sess.is_nightly_build() && std::env::var("CARGO").is_ok() { err.help("consider building the standard library from source with `cargo build -Zbuild-std`"); } - } else if crate_name == sym::profiler_builtins { + } else if Some(crate_name) + == sess.opts.debugging_opts.profiler_runtime.as_deref().map(Symbol::intern) + { err.note(&"the compiler may have been built without the profiler runtime"); } err.span_label(span, "can't find crate");