@@ -45,7 +45,7 @@ pub struct EvalContext<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'mir, 'tcx>> {
45
45
/// The maximum number of terminators that may be evaluated.
46
46
/// This prevents infinite loops and huge computations from freezing up const eval.
47
47
/// Remove once halting problem is solved.
48
- pub ( crate ) steps_remaining : usize ,
48
+ pub ( crate ) terminators_remaining : usize ,
49
49
}
50
50
51
51
/// A stack frame.
@@ -195,7 +195,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M
195
195
memory : Memory :: new ( tcx, memory_data) ,
196
196
stack : Vec :: new ( ) ,
197
197
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 ,
199
199
}
200
200
}
201
201
@@ -538,7 +538,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M
538
538
}
539
539
540
540
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 ( ) ) ;
542
542
543
543
let ( dest, active_field_index) = match * * kind {
544
544
mir:: AggregateKind :: Adt ( adt_def, variant_index, _, active_field_index) => {
0 commit comments