about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoshua Nelson <jnelson@cloudflare.com>2022-09-11 15:14:03 -0500
committerJoshua Nelson <jnelson@cloudflare.com>2022-09-14 18:27:04 -0500
commit0bb4e25ec432beb3629280ea65d1d5475b4f3ee1 (patch)
tree1f22f6d259fb18e1ba78cdf1db187dbe61f409fa
parent0a1fde953319bee0060268aec946afd64d7845da (diff)
downloadrust-0bb4e25ec432beb3629280ea65d1d5475b4f3ee1.tar.gz
rust-0bb4e25ec432beb3629280ea65d1d5475b4f3ee1.zip
Give a better error messages when the rustc shim is missing
-rw-r--r--src/bootstrap/lib.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 4795ae2f956..dc53e4b545b 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 {