Skip to content

Commit d3be521

Browse files
committed
---
yaml --- r: 147678 b: refs/heads/try2 c: 1b06a95 h: refs/heads/master v: v3
1 parent 4eecc0d commit d3be521

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
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: 111e167f48bd2e850e33828f2cb8837ce0da44a7
8+
refs/heads/try2: 1b06a9593fe1d1ec8d1f54efcdc57689907df942
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: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub struct MoveData {
4949
/// assigned dataflow bits, but we track them because they still
5050
/// kill move bits.
5151
path_assignments: RefCell<~[Assignment]>,
52-
assignee_ids: HashSet<ast::NodeId>,
52+
assignee_ids: RefCell<HashSet<ast::NodeId>>,
5353
}
5454

5555
pub struct FlowedMoveData {
@@ -170,7 +170,7 @@ impl MoveData {
170170
moves: RefCell::new(~[]),
171171
path_assignments: RefCell::new(~[]),
172172
var_assignments: RefCell::new(~[]),
173-
assignee_ids: HashSet::new(),
173+
assignee_ids: RefCell::new(HashSet::new()),
174174
}
175175
}
176176

@@ -395,7 +395,10 @@ impl MoveData {
395395

396396
let path_index = self.move_path(tcx, lp);
397397

398-
self.assignee_ids.insert(assignee_id);
398+
{
399+
let mut assignee_ids = self.assignee_ids.borrow_mut();
400+
assignee_ids.get().insert(assignee_id);
401+
}
399402

400403
let assignment = Assignment {
401404
path: path_index,
@@ -666,7 +669,8 @@ impl FlowedMoveData {
666669
-> bool {
667670
//! True if `id` is the id of the LHS of an assignment
668671
669-
self.move_data.assignee_ids.iter().any(|x| x == &id)
672+
let assignee_ids = self.move_data.assignee_ids.borrow();
673+
assignee_ids.get().iter().any(|x| x == &id)
670674
}
671675

672676
pub fn each_assignment_of(&self,

0 commit comments

Comments
 (0)