Rollup merge of #143504 - RalfJung:compiletest-err, r=jieyouxu
compiletest: print slightly more information on fs::write failure See [#t-infra > compiletest: panic in dump_output_file: No such file or dire @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/compiletest.3A.20panic.20in.20dump_output_file.3A.20No.20such.20file.20or.20dire/near/527294714)
This commit is contained in:
commit
097efc07cc
1 changed files with 2 additions and 1 deletions
|
|
@ -1924,7 +1924,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