diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index 96f41d55454e..81012754a771 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -141,7 +141,7 @@ pub struct Session { /// Data about code being compiled, gathered during compilation. pub code_stats: Lock, - next_node_id: Cell, + next_node_id: OneThread>, /// If -zfuel=crate=n is specified, Some(crate). optimization_fuel_crate: Option, @@ -1107,7 +1107,7 @@ pub fn build_session_( type_length_limit: Once::new(), const_eval_stack_frame_limit: 100, const_eval_step_limit: 1_000_000, - next_node_id: Cell::new(NodeId::new(1)), + next_node_id: OneThread::new(Cell::new(NodeId::new(1))), injected_allocator: Cell::new(None), allocator_kind: Cell::new(None), injected_panic_runtime: Cell::new(None),