Skip to content

Commit 1f7d99c

Browse files
committed
---
yaml --- r: 94621 b: refs/heads/try c: 0a0ce8d h: refs/heads/master i: 94619: f321b80 v: v3
1 parent 7347ec7 commit 1f7d99c

File tree

2 files changed

+6
-6
lines changed
  • branches/try/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
@@ -2,7 +2,7 @@
22
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: 9f4cfe2e786e3a2f47b504d4a83dcdc70f29fb2c
5+
refs/heads/try: 0a0ce8d227ceedd53924ce0a9afbac8d5604e3cb
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/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)