File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed 
compiler/rustc_const_eval/src/const_eval Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -163,18 +163,16 @@ where
163163            // Report as hard error. 
164164            let  ( our_span,  frames)  = get_span_and_frames ( ) ; 
165165            let  span = span. unwrap_or ( our_span) ; 
166-             let  err = tcx. sess . create_err ( Spanned  {  span,  node :  InterpErrorExt ( error)  } ) ; 
167166
168-             let  Some ( ( mut  err,  handler) )  = err. into_diagnostic ( )  else  { 
169-                 panic ! ( "did not emit diag" ) ; 
170-             } ; 
167+             let  handler = & tcx. sess . parse_sess . span_diagnostic ; 
168+             let  mut  err = handler. create_err ( Spanned  {  span,  node :  InterpErrorExt ( error) } ) ; 
171169
172170            for  frame in  frames { 
173171                err. eager_subdiagnostic ( handler,  frame) ; 
174172            } 
175173
176174            // Use *our* span to label the interp error 
177-             ErrorHandled :: Reported ( handler . emit_diagnostic ( & mut   err) . unwrap ( ) . into ( ) ) 
175+             ErrorHandled :: Reported ( err. emit ( ) . into ( ) ) 
178176        } 
179177    } 
180178} 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments