Skip to content

Commit 77aa3f9

Browse files
committed
---
yaml --- r: 89032 b: refs/heads/snap-stage3 c: 522743c h: refs/heads/master v: v3
1 parent 30e3b80 commit 77aa3f9

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: deeca5d586bfaa4aa60246f671a8d611d38f6248
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 7cb234bee9dcb411031d4a0b960b2096258aa6ad
4+
refs/heads/snap-stage3: 522743c9dbf561ed026e917d9911d94fad5d19a5
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/borrowck/gather_loans/lifetime.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,10 @@ impl<'a> GuaranteeLifetimeContext<'a> {
305305
mc::cat_local(id) |
306306
mc::cat_self(id) |
307307
mc::cat_arg(id) => {
308-
self.bccx.moved_variables_set.contains(&id)
308+
let moved_variables_set = self.bccx
309+
.moved_variables_set
310+
.borrow();
311+
moved_variables_set.get().contains(&id)
309312
}
310313
mc::cat_rvalue(..) |
311314
mc::cat_static_item |

branches/snap-stage3/src/librustc/middle/moves.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ pub type MovesMap = @RefCell<HashSet<NodeId>>;
169169
* Note: The `VariableMovesMap` stores expression ids that
170170
* are moves, whereas this set stores the ids of the variables
171171
* that are moved at some point */
172-
pub type MovedVariablesSet = @mut HashSet<NodeId>;
172+
pub type MovedVariablesSet = @RefCell<HashSet<NodeId>>;
173173

174174
/** See the section Output on the module comment for explanation. */
175175
#[deriving(Clone)]
@@ -217,7 +217,7 @@ pub fn compute_moves(tcx: ty::ctxt,
217217
move_maps: MoveMaps {
218218
moves_map: @RefCell::new(HashSet::new()),
219219
capture_map: @RefCell::new(HashMap::new()),
220-
moved_variables_set: @mut HashSet::new()
220+
moved_variables_set: @RefCell::new(HashSet::new())
221221
}
222222
};
223223
let visit_cx = &mut visit_cx;
@@ -344,7 +344,11 @@ impl VisitContext {
344344
let def = self.tcx.def_map.get_copy(&expr.id);
345345
let r = moved_variable_node_id_from_def(def);
346346
for &id in r.iter() {
347-
self.move_maps.moved_variables_set.insert(id);
347+
let mut moved_variables_set =
348+
self.move_maps
349+
.moved_variables_set
350+
.borrow_mut();
351+
moved_variables_set.get().insert(id);
348352
}
349353
}
350354
Read => {}

0 commit comments

Comments
 (0)