Skip to content

Commit 0bb4e25

Browse files
committed
Give a better error messages when the rustc shim is missing
1 parent 0a1fde9 commit 0bb4e25

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/bootstrap/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,10 @@ impl Build {
463463
.to_path_buf();
464464
if !bootstrap_out.join(exe("rustc", config.build)).exists() && !cfg!(test) {
465465
// this restriction can be lifted whenever https://github.com/rust-lang/rfcs/pull/3028 is implemented
466-
panic!("run `cargo build --bins` before `cargo run`")
466+
panic!(
467+
"`rustc` not found in {}, run `cargo build --bins` before `cargo run`",
468+
bootstrap_out.display()
469+
)
467470
}
468471

469472
let mut build = Build {

0 commit comments

Comments
 (0)