]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_metadata/src/locator.rs
Rollup merge of #86424 - calebcartwright:rustfmt-mod-resolution, r=Mark-Simulacrum
[rust.git] / compiler / rustc_metadata / src / locator.rs
index 6e7360950908e9dbd164ff0c7f7ecfebb93f4b91..8570bf30f80787a7c2ac8bb0a3c13207438c8d40 100644 (file)
@@ -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");