Remove detection of rustup and cargo in 'missing extern crate' diagnostics
Previously, this would change the test output when RUSTUP_HOME was set: ``` ---- [ui] ui/issues/issue-49851/compiler-builtins-error.rs stdout ---- diff of stderr: 1 error[E0463]: can't find crate for `core` 2 | 3 = note: the `thumbv7em-none-eabihf` target may not be installed + = help: consider downloading the target with `rustup target add thumbv7em-none-eabihf` 4 5 error: aborting due to previous error 6 ``` Originally, I fixed it by explicitly unsetting RUSTUP_HOME in compiletest. Then I realized that almost no one has RUSTUP_HOME set, since rustup doesn't set it itself; although it does set RUST_RECURSION_COUNT whenever it launches a proxy. Then it was pointed out that this runtime check doesn't really make sense and it's fine to make it unconditional.
This commit is contained in:
parent
32c9b7b091
commit
17f7536fb2
5 changed files with 10 additions and 4 deletions
|
@ -1080,7 +1080,10 @@ impl CrateError {
|
|||
locator.triple
|
||||
));
|
||||
}
|
||||
if missing_core && std::env::var("RUSTUP_HOME").is_ok() {
|
||||
// NOTE: this suggests using rustup, even though the user may not have it installed.
|
||||
// That's because they could choose to install it; or this may give them a hint which
|
||||
// target they need to install from their distro.
|
||||
if missing_core {
|
||||
err.help(&format!(
|
||||
"consider downloading the target with `rustup target add {}`",
|
||||
locator.triple
|
||||
|
@ -1097,7 +1100,7 @@ impl CrateError {
|
|||
current_crate
|
||||
));
|
||||
}
|
||||
if sess.is_nightly_build() && std::env::var("CARGO").is_ok() {
|
||||
if sess.is_nightly_build() {
|
||||
err.help("consider building the standard library from source with `cargo build -Zbuild-std`");
|
||||
}
|
||||
} else if Some(crate_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue