Skip to content

Commit a46b056

Browse files
committed
---
yaml --- r: 97108 b: refs/heads/dist-snap c: 522743c h: refs/heads/master v: v3
1 parent 774fcde commit a46b056

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
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 7cb234bee9dcb411031d4a0b960b2096258aa6ad
9+
refs/heads/dist-snap: 522743c9dbf561ed026e917d9911d94fad5d19a5
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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/dist-snap/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)