File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -881,7 +881,7 @@ pub fn build_session_(sopts: @session::options,
881
881
building_library : @mut false ,
882
882
working_dir : os:: getcwd ( ) ,
883
883
lints : RefCell :: new ( HashMap :: new ( ) ) ,
884
- node_id : @ mut 1 ,
884
+ node_id : Cell :: new ( 1 ) ,
885
885
outputs : @mut ~[ ] ,
886
886
}
887
887
}
Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ pub struct Session_ {
214
214
working_dir : Path ,
215
215
lints : RefCell < HashMap < ast:: NodeId ,
216
216
~[ ( lint:: lint , codemap:: Span , ~str ) ] > > ,
217
- node_id : @ mut ast:: NodeId ,
217
+ node_id : Cell < ast:: NodeId > ,
218
218
outputs : @mut ~[ OutputStyle ] ,
219
219
}
220
220
@@ -282,10 +282,10 @@ impl Session_ {
282
282
self . reserve_node_ids ( 1 )
283
283
}
284
284
pub fn reserve_node_ids ( & self , count : ast:: NodeId ) -> ast:: NodeId {
285
- let v = * self . node_id ;
285
+ let v = self . node_id . get ( ) ;
286
286
287
287
match v. checked_add ( & count) {
288
- Some ( next) => { * self . node_id = next; }
288
+ Some ( next) => { self . node_id . set ( next) ; }
289
289
None => self . bug ( "Input too large, ran out of node ids!" )
290
290
}
291
291
You can’t perform that action at this time.
0 commit comments