compiletest: print slightly more information on fs::write failure
This commit is contained in:
parent
6dec76f1c2
commit
9c9c5b041b
1 changed files with 2 additions and 1 deletions
|
|
@ -1918,7 +1918,8 @@ impl<'test> TestCx<'test> {
|
|||
|
||||
fn dump_output_file(&self, out: &str, extension: &str) {
|
||||
let outfile = self.make_out_name(extension);
|
||||
fs::write(outfile.as_std_path(), out).unwrap();
|
||||
fs::write(outfile.as_std_path(), out)
|
||||
.unwrap_or_else(|err| panic!("failed to write {outfile}: {err:?}"));
|
||||
}
|
||||
|
||||
/// Creates a filename for output with the given extension.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue