@@ -97,8 +97,12 @@ impl MachineStopType for TerminationInfo {
97
97
}
98
98
fn add_args (
99
99
self : Box < Self > ,
100
- _: & mut dyn FnMut ( std:: borrow:: Cow < ' static , str > , rustc_errors:: DiagnosticArgValue < ' static > ) ,
101
- ) { }
100
+ _: & mut dyn FnMut (
101
+ std:: borrow:: Cow < ' static , str > ,
102
+ rustc_errors:: DiagnosticArgValue < ' static > ,
103
+ ) ,
104
+ ) {
105
+ }
102
106
}
103
107
104
108
/// Miri specific diagnostics
@@ -324,10 +328,9 @@ pub fn report_error<'tcx, 'mir>(
324
328
// We want to dump the allocation if this is `InvalidUninitBytes`. Since `add_args` consumes
325
329
// the `InterpError`, we extract the variables it before that.
326
330
let extra = match e {
327
- UndefinedBehavior ( UndefinedBehaviorInfo :: InvalidUninitBytes ( Some ( ( alloc_id, access) ) ) ) => {
328
- Some ( ( alloc_id, access) )
329
- }
330
- _ => None
331
+ UndefinedBehavior ( UndefinedBehaviorInfo :: InvalidUninitBytes ( Some ( ( alloc_id, access) ) ) ) =>
332
+ Some ( ( alloc_id, access) ) ,
333
+ _ => None ,
331
334
} ;
332
335
333
336
// FIXME(fee1-dead), HACK: we want to use the error as title therefore we can just extract the
@@ -477,7 +480,7 @@ pub fn report_msg<'tcx>(
477
480
}
478
481
479
482
let ( mut err, handler) = err. into_diagnostic ( ) . unwrap ( ) ;
480
-
483
+
481
484
// Add backtrace
482
485
for ( idx, frame_info) in stacktrace. iter ( ) . enumerate ( ) {
483
486
let is_local = machine. is_local ( frame_info) ;
0 commit comments