@@ -49,7 +49,7 @@ pub struct MoveData {
49
49
/// assigned dataflow bits, but we track them because they still
50
50
/// kill move bits.
51
51
path_assignments : RefCell < ~[ Assignment ] > ,
52
- assignee_ids : HashSet < ast:: NodeId > ,
52
+ assignee_ids : RefCell < HashSet < ast:: NodeId > > ,
53
53
}
54
54
55
55
pub struct FlowedMoveData {
@@ -170,7 +170,7 @@ impl MoveData {
170
170
moves : RefCell :: new ( ~[ ] ) ,
171
171
path_assignments : RefCell :: new ( ~[ ] ) ,
172
172
var_assignments : RefCell :: new ( ~[ ] ) ,
173
- assignee_ids : HashSet :: new ( ) ,
173
+ assignee_ids : RefCell :: new ( HashSet :: new ( ) ) ,
174
174
}
175
175
}
176
176
@@ -395,7 +395,10 @@ impl MoveData {
395
395
396
396
let path_index = self . move_path ( tcx, lp) ;
397
397
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
+ }
399
402
400
403
let assignment = Assignment {
401
404
path : path_index,
@@ -666,7 +669,8 @@ impl FlowedMoveData {
666
669
-> bool {
667
670
//! True if `id` is the id of the LHS of an assignment
668
671
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)
670
674
}
671
675
672
676
pub fn each_assignment_of ( & self ,
0 commit comments