Rollup merge of #117163 - tmiasko:compiletest-mir-opt, r=compiler-errors

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.
This commit is contained in:
Matthias Krüger 2023-10-25 19:51:16 +02:00 committed by GitHub
commit beba52207e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();