@@ -135,7 +135,7 @@ pub enum LocalValue<Tag=(), Id=AllocId> {
135135impl < ' tcx , Tag : Copy + ' static > LocalState < ' tcx , Tag > {
136136 pub fn access ( & self ) -> InterpResult < ' tcx , Operand < Tag > > {
137137 match self . value {
138- LocalValue :: Dead => throw_err_unsup ! ( DeadLocal ) ,
138+ LocalValue :: Dead => throw_unsup ! ( DeadLocal ) ,
139139 LocalValue :: Uninitialized =>
140140 bug ! ( "The type checker should prevent reading from a never-written local" ) ,
141141 LocalValue :: Live ( val) => Ok ( val) ,
@@ -148,7 +148,7 @@ impl<'tcx, Tag: Copy + 'static> LocalState<'tcx, Tag> {
148148 & mut self ,
149149 ) -> InterpResult < ' tcx , Result < & mut LocalValue < Tag > , MemPlace < Tag > > > {
150150 match self . value {
151- LocalValue :: Dead => throw_err_unsup ! ( DeadLocal ) ,
151+ LocalValue :: Dead => throw_unsup ! ( DeadLocal ) ,
152152 LocalValue :: Live ( Operand :: Indirect ( mplace) ) => Ok ( Err ( mplace) ) ,
153153 ref mut local @ LocalValue :: Live ( Operand :: Immediate ( _) ) |
154154 ref mut local @ LocalValue :: Uninitialized => {
@@ -305,7 +305,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
305305 & substs,
306306 ) ) ,
307307 None => if substs. needs_subst ( ) {
308- throw_err_inval ! ( TooGeneric )
308+ throw_inval ! ( TooGeneric )
309309 } else {
310310 Ok ( substs)
311311 } ,
@@ -339,14 +339,14 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
339339 && self . tcx . has_typeck_tables ( did)
340340 && self . tcx . typeck_tables_of ( did) . tainted_by_errors
341341 {
342- return throw_err_inval ! ( TypeckError ) ;
342+ throw_inval ! ( TypeckError )
343343 }
344344 trace ! ( "load mir {:?}" , instance) ;
345345 match instance {
346346 ty:: InstanceDef :: Item ( def_id) => if self . tcx . is_mir_available ( did) {
347347 Ok ( self . tcx . optimized_mir ( did) )
348348 } else {
349- throw_err_unsup ! ( NoMirFor ( self . tcx. def_path_str( def_id) ) )
349+ throw_unsup ! ( NoMirFor ( self . tcx. def_path_str( def_id) ) )
350350 } ,
351351 _ => Ok ( self . tcx . instance_mir ( instance) ) ,
352352 }
@@ -359,7 +359,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
359359 match self . stack . last ( ) {
360360 Some ( frame) => Ok ( self . monomorphize_with_substs ( t, frame. instance . substs ) ?) ,
361361 None => if t. needs_subst ( ) {
362- throw_err_inval ! ( TooGeneric ) . into ( )
362+ throw_inval ! ( TooGeneric )
363363 } else {
364364 Ok ( t)
365365 } ,
@@ -376,7 +376,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
376376 let substituted = t. subst ( * self . tcx , substs) ;
377377
378378 if substituted. needs_subst ( ) {
379- return throw_err_inval ! ( TooGeneric ) ;
379+ throw_inval ! ( TooGeneric )
380380 }
381381
382382 Ok ( self . tcx . normalize_erasing_regions ( ty:: ParamEnv :: reveal_all ( ) , substituted) )
@@ -575,7 +575,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
575575 info ! ( "ENTERING({}) {}" , self . cur_frame( ) , self . frame( ) . instance) ;
576576
577577 if self . stack . len ( ) > self . tcx . sess . const_eval_stack_frame_limit {
578- throw_err_exhaust ! ( StackFrameLimitReached )
578+ throw_exhaust ! ( StackFrameLimitReached )
579579 } else {
580580 Ok ( ( ) )
581581 }
@@ -623,7 +623,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
623623 }
624624 } else {
625625 // Uh, that shouldn't happen... the function did not intend to return
626- return throw_err_ub ! ( Unreachable ) ;
626+ throw_ub ! ( Unreachable )
627627 }
628628 // Jump to new block -- *after* validation so that the spans make more sense.
629629 match frame. return_to_block {
0 commit comments