Skip to content

Commit

Permalink
Rollup merge of #117163 - tmiasko:compiletest-mir-opt, r=compiler-errors
Browse files Browse the repository at this point in the history
compiletest: Display compilation errors in mir-opt tests

Previously when compilation failed the `check_mir_dump` would panic first, so we would never display the compiler output.
  • Loading branch information
matthiaskrgr committed Oct 25, 2023
2 parents 26a9e08 + a9fad1c commit beba522
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/runtest.rs
Expand Up @@ -3999,10 +3999,10 @@ impl<'test> TestCx<'test> {
let passes = std::mem::take(&mut test_info.passes);

let proc_res = self.compile_test_with_passes(should_run, Emit::Mir, passes);
self.check_mir_dump(test_info);
if !proc_res.status.success() {
self.fatal_proc_rec("compilation failed!", &proc_res);
}
self.check_mir_dump(test_info);

if let WillExecute::Yes = should_run {
let proc_res = self.exec_compiled_test();
Expand Down

0 comments on commit beba522

Please sign in to comment.