Skip to content

Commit d2e219c

Browse files
committed
Auto merge of #3294 - rust-lang:rustup-2024-02-11, r=saethlin
Automatic Rustup
2 parents 1e050bc + 9de0b1a commit d2e219c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b5c46dc5426038a49c95398bce30eeb20ec421e2
1+
0cbef48150e1fab161b5fd147b57ceb3f9272a52

src/diagnostics.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ pub fn report_error<'tcx, 'mir>(
285285
) =>
286286
{
287287
ecx.handle_ice(); // print interpreter backtrace
288-
bug!("This validation error should be impossible in Miri: {}", ecx.format_error(e));
288+
bug!(
289+
"This validation error should be impossible in Miri: {}",
290+
format_interp_error(ecx.tcx.dcx(), e)
291+
);
289292
}
290293
UndefinedBehavior(_) => "Undefined Behavior",
291294
ResourceExhaustion(_) => "resource exhaustion",
@@ -299,7 +302,10 @@ pub fn report_error<'tcx, 'mir>(
299302
) => "post-monomorphization error",
300303
_ => {
301304
ecx.handle_ice(); // print interpreter backtrace
302-
bug!("This error should be impossible in Miri: {}", ecx.format_error(e));
305+
bug!(
306+
"This error should be impossible in Miri: {}",
307+
format_interp_error(ecx.tcx.dcx(), e)
308+
);
303309
}
304310
};
305311
#[rustfmt::skip]
@@ -365,7 +371,7 @@ pub fn report_error<'tcx, 'mir>(
365371
_ => {}
366372
}
367373

368-
msg.insert(0, ecx.format_error(e));
374+
msg.insert(0, format_interp_error(ecx.tcx.dcx(), e));
369375

370376
report_msg(
371377
DiagLevel::Error,

0 commit comments

Comments
 (0)