File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -645,15 +645,17 @@ pub fn const_eval_raw_provider<'a, 'tcx>(
645645 // an error must be reported.
646646 let reported_err = tcx. sess . track_errors ( || {
647647 err. report_as_error ( ecx. tcx ,
648- "could not evaluate static initializer" ) ;
648+ "could not evaluate static initializer" )
649649 } ) ;
650650 match reported_err {
651- Ok ( v) => tcx. sess . delay_span_bug ( err. span ,
651+ Ok ( v) => {
652+ tcx. sess . delay_span_bug ( err. span ,
652653 & format ! ( "static eval failure did not emit an error: {:#?}" ,
653- v) ) ,
654- Err ( err) => err,
654+ v) ) ;
655+ v
656+ } ,
657+ Err ( ErrorReported ) => ErrorHandled :: Reported ,
655658 }
656- reported_err
657659 } else if def_id. is_local ( ) {
658660 // constant defined in this crate, we can figure out a lint level!
659661 match tcx. describe_def ( def_id) {
You can’t perform that action at this time.
0 commit comments