mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
Make a panic message more informative if binary files are accidentally created somewhere in the test folder
This commit is contained in:
parent
4c779da913
commit
0afd38b093
@ -16,7 +16,7 @@ fn old_test_headers() {
|
||||
continue;
|
||||
}
|
||||
|
||||
let file = fs::read_to_string(entry.path()).unwrap();
|
||||
let file = fs::read_to_string(entry.path()).unwrap_or_else(|err| panic!("{}: {err}", entry.path().display()));
|
||||
|
||||
if let Some(header) = old_headers.find(&file) {
|
||||
println!("Found header `{}` in {}", header.as_str(), entry.path().display());
|
||||
|
Loading…
Reference in New Issue
Block a user