From 0bb4e25ec432beb3629280ea65d1d5475b4f3ee1 Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Sun, 11 Sep 2022 15:14:03 -0500 Subject: [PATCH] Give a better error messages when the rustc shim is missing --- src/bootstrap/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 4795ae2f9563..dc53e4b545b3 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -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 {