diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 247727762d16e..c09de02ab51c7 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -1288,6 +1288,9 @@ impl Build { t!(fs::create_dir_all(dstdir)); drop(fs::remove_file(&dst)); { + if !src.exists() { + panic!("Error: File \"{}\" not found!", src.display()); + } let mut s = t!(fs::File::open(&src)); let mut d = t!(fs::File::create(&dst)); io::copy(&mut s, &mut d).expect("failed to copy");