8000 Const check/promotion cleanup and sanity assertion by oli-obk · Pull Request #71198 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Const check/promotion cleanup and sanity assertion #71198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 23, 2020
Next Next commit
Fix ui test blessing when a test has an empty stderr file after havin…
…g had content there before the current changes
  • Loading branch information
oli-obk committed Apr 23, 2020
commit a135ced5ce76a842c85a9b62baccefc5e53fb31c
6 changes: 5 additions & 1 deletion src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3338,6 +3338,10 @@ impl<'test> TestCx<'test> {
}

fn delete_file(&self, file: &PathBuf) {
if !file.exists() {
// Deleting a nonexistant file would error.
return;
}
if let Err(e) = fs::remove_file(file) {
self.fatal(&format!("failed to delete `{}`: {}", file.display(), e,));
}
Expand Down Expand Up @@ -3400,7 +3404,7 @@ impl<'test> TestCx<'test> {
let examined_content =
self.load_expected_output_from_path(&examined_path).unwrap_or_else(|_| String::new());

if examined_path.exists() && canon_content == &examined_content {
if canon_content == &examined_content {
self.delete_file(&examined_path);
}
}
Expand Down
0