Skip to content

Commit 9057dae

Browse files
committed
Reorder output
1 parent e37d0e3 commit 9057dae

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/diagnostics.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,14 @@ pub fn report_error<'tcx, 'mir>(
114114
};
115115

116116
e.print_backtrace();
117+
let msg = e.to_string();
118+
let result = report_msg(ecx, &format!("{}: {}", title, msg), msg, helps, true);
119+
117120
if let UndefinedBehavior(UndefinedBehaviorInfo::InvalidUndefBytes(Some(ptr))) = e.kind {
118121
ecx.memory.dump_alloc(ptr.alloc_id);
119122
}
120-
let msg = e.to_string();
121-
report_msg(ecx, &format!("{}: {}", title, msg), msg, helps, true)
123+
124+
result
122125
}
123126

124127
/// Report an error or note (depending on the `error` argument) at the current frame's current statement.

0 commit comments

Comments
 (0)