From c9a56cdc58bbb51ece4510f4e54ef2fe26b7b771 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 10 Sep 2021 20:20:10 +0200 Subject: [PATCH] Add help for E0463 --- compiler/rustc_metadata/src/locator.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/rustc_metadata/src/locator.rs b/compiler/rustc_metadata/src/locator.rs index d3512b6cf57..b6922e0d72a 100644 --- a/compiler/rustc_metadata/src/locator.rs +++ b/compiler/rustc_metadata/src/locator.rs @@ -1095,6 +1095,11 @@ impl CrateError { == Symbol::intern(&sess.opts.debugging_opts.profiler_runtime) { err.note(&"the compiler may have been built without the profiler runtime"); + } else if crate_name.as_str().starts_with("rustc_") { + err.help( + "maybe you need to install the missing components with: \ + `rustup component add rust-src rustc-dev llvm-tools-preview`", + ); } err.span_label(span, "can't find crate"); err