File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/librustc/middle/typeck/infer/region_inference Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ pub struct RegionVarBindings {
93
93
lubs : CombineMap ,
94
94
glbs : CombineMap ,
95
95
skolemization_count : Cell < uint > ,
96
- bound_count : uint ,
96
+ bound_count : Cell < uint > ,
97
97
98
98
// The undo log records actions that might later be undone.
99
99
//
@@ -119,7 +119,7 @@ pub fn RegionVarBindings(tcx: ty::ctxt) -> RegionVarBindings {
119
119
lubs : HashMap :: new ( ) ,
120
120
glbs : HashMap :: new ( ) ,
121
121
skolemization_count : Cell :: new ( 0 ) ,
122
- bound_count : 0 ,
122
+ bound_count : Cell :: new ( 0 ) ,
123
123
undo_log : ~[ ]
124
124
}
125
125
}
@@ -212,10 +212,10 @@ impl RegionVarBindings {
212
212
// changing the representation of bound regions in a fn
213
213
// declaration
214
214
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 ) ;
217
217
218
- if sc >= self . bound_count {
218
+ if sc >= self . bound_count . get ( ) {
219
219
self . tcx . sess . bug ( "Rollover in RegionInference new_bound()" ) ;
220
220
}
221
221
You can’t perform that action at this time.
0 commit comments