Give a better error messages when the rustc shim is missing

This commit is contained in:
Joshua Nelson 2022-09-11 15:14:03 -05:00
parent 0a1fde9533
commit 0bb4e25ec4

View file

@ -463,7 +463,10 @@ impl Build {
.to_path_buf();
if !bootstrap_out.join(exe("rustc", config.build)).exists() && !cfg!(test) {
// this restriction can be lifted whenever https://github.com/rust-lang/rfcs/pull/3028 is implemented
panic!("run `cargo build --bins` before `cargo run`")
panic!(
"`rustc` not found in {}, run `cargo build --bins` before `cargo run`",
bootstrap_out.display()
)
}
let mut build = Build {