]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #88830 - GuillaumeGomez:help-e0463, r=estebank
authorJubilee <46493976+workingjubilee@users.noreply.github.com>
Sat, 11 Sep 2021 15:23:44 +0000 (08:23 -0700)
committerGitHub <noreply@github.com>
Sat, 11 Sep 2021 15:23:44 +0000 (08:23 -0700)
Add help for E0463

Fixes #87871.

r? ```@estebank```

compiler/rustc_metadata/src/locator.rs

index d3512b6cf579e18e1d0cd4d70914ae7c7d1f1231..b6922e0d72a065364c0e0444c70e961128ae5328 100644 (file)
@@ -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