Skip to content

Commit 9cf76ed

Browse files
authored
Unrolled build for #143504
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)
2 parents e804cd4 + 9c9c5b0 commit 9cf76ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/compiletest/src/runtest.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1924,7 +1924,8 @@ impl<'test> TestCx<'test> {
19241924

19251925
fn dump_output_file(&self, out: &str, extension: &str) {
19261926
let outfile = self.make_out_name(extension);
1927-
fs::write(outfile.as_std_path(), out).unwrap();
1927+
fs::write(outfile.as_std_path(), out)
1928+
.unwrap_or_else(|err| panic!("failed to write {outfile}: {err:?}"));
19281929
}
19291930

19301931
/// Creates a filename for output with the given extension.

0 commit comments

Comments
 (0)