Skip to content

Commit d9774a4

Browse files
committed
---
yaml --- r: 94726 b: refs/heads/try c: 1b06a95 h: refs/heads/master v: v3
1 parent 79d687a commit d9774a4

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
@@ -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: 111e167f48bd2e850e33828f2cb8837ce0da44a7
5+
refs/heads/try: 1b06a9593fe1d1ec8d1f54efcdc57689907df942
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

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