Remove Cell from const_eval_stack_frame_limit and const_eval_step_limit
This commit is contained in:
parent
753cd9a12c
commit
a23e90a6de
2 changed files with 6 additions and 6 deletions
|
@ -111,9 +111,9 @@ pub struct Session {
|
||||||
pub type_length_limit: Once<usize>,
|
pub type_length_limit: Once<usize>,
|
||||||
|
|
||||||
/// The maximum number of stackframes allowed in const eval
|
/// The maximum number of stackframes allowed in const eval
|
||||||
pub const_eval_stack_frame_limit: Cell<usize>,
|
pub const_eval_stack_frame_limit: usize,
|
||||||
/// The maximum number miri steps per constant
|
/// The maximum number miri steps per constant
|
||||||
pub const_eval_step_limit: Cell<usize>,
|
pub const_eval_step_limit: usize,
|
||||||
|
|
||||||
/// The metadata::creader module may inject an allocator/panic_runtime
|
/// The metadata::creader module may inject an allocator/panic_runtime
|
||||||
/// dependency if it didn't already find one, and this tracks what was
|
/// dependency if it didn't already find one, and this tracks what was
|
||||||
|
@ -1110,8 +1110,8 @@ pub fn build_session_(
|
||||||
features: RefCell::new(None),
|
features: RefCell::new(None),
|
||||||
recursion_limit: Once::new(),
|
recursion_limit: Once::new(),
|
||||||
type_length_limit: Once::new(),
|
type_length_limit: Once::new(),
|
||||||
const_eval_stack_frame_limit: Cell::new(100),
|
const_eval_stack_frame_limit: 100,
|
||||||
const_eval_step_limit: Cell::new(1_000_000),
|
const_eval_step_limit: 1_000_000,
|
||||||
next_node_id: Cell::new(NodeId::new(1)),
|
next_node_id: Cell::new(NodeId::new(1)),
|
||||||
injected_allocator: Cell::new(None),
|
injected_allocator: Cell::new(None),
|
||||||
allocator_kind: Cell::new(None),
|
allocator_kind: Cell::new(None),
|
||||||
|
|
|
@ -194,8 +194,8 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M
|
||||||
param_env,
|
param_env,
|
||||||
memory: Memory::new(tcx, memory_data),
|
memory: Memory::new(tcx, memory_data),
|
||||||
stack: Vec::new(),
|
stack: Vec::new(),
|
||||||
stack_limit: tcx.sess.const_eval_stack_frame_limit.get(),
|
stack_limit: tcx.sess.const_eval_stack_frame_limit,
|
||||||
steps_remaining: tcx.sess.const_eval_step_limit.get(),
|
steps_remaining: tcx.sess.const_eval_step_limit,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue