Skip to content

Commit d40f0c5

Browse files
committed
---
yaml --- r: 147676 b: refs/heads/try2 c: 4603057 h: refs/heads/master v: v3
1 parent d74f1fb commit d40f0c5

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-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: 7d3e25394f78bdcd9783460be26809807c8dacc1
8+
refs/heads/try2: 460305749c3b8c0a0726f490e7669f8259e6bbb9
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/borrowck/move_data.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub struct MoveData {
4848
/// Assignments to a path, like `x.f = foo`. These are not
4949
/// assigned dataflow bits, but we track them because they still
5050
/// kill move bits.
51-
path_assignments: ~[Assignment],
51+
path_assignments: RefCell<~[Assignment]>,
5252
assignee_ids: HashSet<ast::NodeId>,
5353
}
5454

@@ -168,7 +168,7 @@ impl MoveData {
168168
paths: RefCell::new(~[]),
169169
path_map: RefCell::new(HashMap::new()),
170170
moves: RefCell::new(~[]),
171-
path_assignments: ~[],
171+
path_assignments: RefCell::new(~[]),
172172
var_assignments: ~[],
173173
assignee_ids: HashSet::new(),
174174
}
@@ -412,7 +412,10 @@ impl MoveData {
412412
debug!("add_assignment[path](lp={}, path_index={:?})",
413413
lp.repr(tcx), path_index);
414414

415-
self.path_assignments.push(assignment);
415+
{
416+
let mut path_assignments = self.path_assignments.borrow_mut();
417+
path_assignments.get().push(assignment);
418+
}
416419
}
417420
}
418421

@@ -440,8 +443,11 @@ impl MoveData {
440443
self.kill_moves(assignment.path, assignment.id, dfcx_moves);
441444
}
442445

443-
for assignment in self.path_assignments.iter() {
444-
self.kill_moves(assignment.path, assignment.id, dfcx_moves);
446+
{
447+
let path_assignments = self.path_assignments.borrow();
448+
for assignment in path_assignments.get().iter() {
449+
self.kill_moves(assignment.path, assignment.id, dfcx_moves);
450+
}
445451
}
446452

447453
// Kill all moves related to a variable `x` when it goes out

0 commit comments

Comments
 (0)