Skip to content

Commit bdfd0b5

Browse files
committed
librustc: De-@mut RegionVarBindings::bound_count
1 parent 0a0ce8d commit bdfd0b5

File tree

1 file changed

+5
-5
lines changed
  • src/librustc/middle/typeck/infer/region_inference

1 file changed

+5
-5
lines changed

src/librustc/middle/typeck/infer/region_inference/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pub struct RegionVarBindings {
9393
lubs: CombineMap,
9494
glbs: CombineMap,
9595
skolemization_count: Cell<uint>,
96-
bound_count: uint,
96+
bound_count: Cell<uint>,
9797

9898
// The undo log records actions that might later be undone.
9999
//
@@ -119,7 +119,7 @@ pub fn RegionVarBindings(tcx: ty::ctxt) -> RegionVarBindings {
119119
lubs: HashMap::new(),
120120
glbs: HashMap::new(),
121121
skolemization_count: Cell::new(0),
122-
bound_count: 0,
122+
bound_count: Cell::new(0),
123123
undo_log: ~[]
124124
}
125125
}
@@ -212,10 +212,10 @@ impl RegionVarBindings {
212212
// changing the representation of bound regions in a fn
213213
// declaration
214214

215-
let sc = self.bound_count;
216-
self.bound_count += 1;
215+
let sc = self.bound_count.get();
216+
self.bound_count.set(sc + 1);
217217

218-
if sc >= self.bound_count {
218+
if sc >= self.bound_count.get() {
219219
self.tcx.sess.bug("Rollover in RegionInference new_bound()");
220220
}
221221

0 commit comments

Comments
 (0)