Skip to content

Commit 876a236

Browse files
committed
---
yaml --- r: 147573 b: refs/heads/try2 c: 0a0ce8d h: refs/heads/master i: 147571: 441a6c0 v: v3
1 parent 35f174f commit 876a236

File tree

2 files changed

+6
-6
lines changed
  • branches/try2/src/librustc/middle/typeck/infer/region_inference

2 files changed

+6
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 9f4cfe2e786e3a2f47b504d4a83dcdc70f29fb2c
8+
refs/heads/try2: 0a0ce8d227ceedd53924ce0a9afbac8d5604e3cb
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use middle::graph::{Direction, NodeIndex};
2424
use util::common::indenter;
2525
use util::ppaux::{Repr};
2626

27-
use std::cell::RefCell;
27+
use std::cell::{Cell, RefCell};
2828
use std::hashmap::{HashMap, HashSet};
2929
use std::uint;
3030
use std::vec;
@@ -92,7 +92,7 @@ pub struct RegionVarBindings {
9292
constraints: RefCell<HashMap<Constraint, SubregionOrigin>>,
9393
lubs: CombineMap,
9494
glbs: CombineMap,
95-
skolemization_count: uint,
95+
skolemization_count: Cell<uint>,
9696
bound_count: uint,
9797

9898
// The undo log records actions that might later be undone.
@@ -118,7 +118,7 @@ pub fn RegionVarBindings(tcx: ty::ctxt) -> RegionVarBindings {
118118
constraints: RefCell::new(HashMap::new()),
119119
lubs: HashMap::new(),
120120
glbs: HashMap::new(),
121-
skolemization_count: 0,
121+
skolemization_count: Cell::new(0),
122122
bound_count: 0,
123123
undo_log: ~[]
124124
}
@@ -188,8 +188,8 @@ impl RegionVarBindings {
188188
}
189189

190190
pub fn new_skolemized(&mut self, br: ty::BoundRegion) -> Region {
191-
let sc = self.skolemization_count;
192-
self.skolemization_count += 1;
191+
let sc = self.skolemization_count.get();
192+
self.skolemization_count.set(sc + 1);
193193
ReInfer(ReSkolemized(sc, br))
194194
}
195195

0 commit comments

Comments
 (0)