about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee <46493976+workingjubilee@users.noreply.github.com>2021-09-11 08:23:44 -0700
committerGitHub <noreply@github.com>2021-09-11 08:23:44 -0700
commit2cfafa6a8d6b41c973e92d46582e2f0dff489e10 (patch)
treed6a6a34be36b96c2eb0df991ff5864c9fdd79996
parent5648859e509fd5b6c1e5621f4ade770cfd42cc5d (diff)
parentc9a56cdc58bbb51ece4510f4e54ef2fe26b7b771 (diff)
downloadrust-2cfafa6a8d6b41c973e92d46582e2f0dff489e10.tar.gz
rust-2cfafa6a8d6b41c973e92d46582e2f0dff489e10.zip
Rollup merge of #88830 - GuillaumeGomez:help-e0463, r=estebank
Add help for E0463

Fixes #87871.

r? ```@estebank```
-rw-r--r--compiler/rustc_metadata/src/locator.rs5
1 files changed, 5 insertions, 0 deletions
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