diff --git a/src/librustc_mir/const_eval.rs b/src/librustc_mir/const_eval.rs index 80076c6f0353..9f73c2aa06e6 100644 --- a/src/librustc_mir/const_eval.rs +++ b/src/librustc_mir/const_eval.rs @@ -650,9 +650,9 @@ pub fn const_eval_raw_provider<'a, 'tcx>( "could not evaluate static initializer"); }); match tracked_err { - Ok(_) => tcx.sess.delay_span_bug(err.span, + Ok(reported_err) => tcx.sess.delay_span_bug(err.span, &format!("static eval failure did not emit an error: {:#?}", - tracked_err)), + reported_err)), Err(_) => (), } reported_err