@@ -45,7 +45,7 @@ pub struct EvalContext<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'mir, 'tcx>> {
4545 /// The maximum number of terminators that may be evaluated.
4646 /// This prevents infinite loops and huge computations from freezing up const eval.
4747 /// Remove once halting problem is solved.
48- pub ( crate ) steps_remaining : usize ,
48+ pub ( crate ) terminators_remaining : usize ,
4949}
5050
5151/// A stack frame.
@@ -195,7 +195,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M
195195 memory : Memory :: new ( tcx, memory_data) ,
196196 stack : Vec :: new ( ) ,
197197 stack_limit : tcx. sess . const_eval_stack_frame_limit . get ( ) ,
198- steps_remaining : tcx . sess . const_eval_step_limit . get ( ) ,
198+ terminators_remaining : 1_000_000 ,
199199 }
200200 }
201201
@@ -538,7 +538,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M
538538 }
539539
540540 Aggregate ( ref kind, ref operands) => {
541- self . inc_step_counter_and_check_limit ( operands. len ( ) ) ? ;
541+ self . inc_step_counter_and_check_limit ( operands. len ( ) ) ;
542542
543543 let ( dest, active_field_index) = match * * kind {
544544 mir:: AggregateKind :: Adt ( adt_def, variant_index, _, active_field_index) => {
0 commit comments