File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
branches/snap-stage3/src/librustc/middle Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: deeca5d586bfaa4aa60246f671a8d611d38f6248
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 7cb234bee9dcb411031d4a0b960b2096258aa6ad
4
+ refs/heads/snap-stage3: 522743c9dbf561ed026e917d9911d94fad5d19a5
5
5
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
Original file line number Diff line number Diff line change @@ -305,7 +305,10 @@ impl<'a> GuaranteeLifetimeContext<'a> {
305
305
mc:: cat_local( id) |
306
306
mc:: cat_self( id) |
307
307
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)
309
312
}
310
313
mc:: cat_rvalue( ..) |
311
314
mc:: cat_static_item |
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ pub type MovesMap = @RefCell<HashSet<NodeId>>;
169
169
* Note: The `VariableMovesMap` stores expression ids that
170
170
* are moves, whereas this set stores the ids of the variables
171
171
* that are moved at some point */
172
- pub type MovedVariablesSet = @mut HashSet < NodeId > ;
172
+ pub type MovedVariablesSet = @RefCell < HashSet < NodeId > > ;
173
173
174
174
/** See the section Output on the module comment for explanation. */
175
175
#[ deriving( Clone ) ]
@@ -217,7 +217,7 @@ pub fn compute_moves(tcx: ty::ctxt,
217
217
move_maps : MoveMaps {
218
218
moves_map : @RefCell :: new ( HashSet :: new ( ) ) ,
219
219
capture_map : @RefCell :: new ( HashMap :: new ( ) ) ,
220
- moved_variables_set : @mut HashSet :: new ( )
220
+ moved_variables_set : @RefCell :: new ( HashSet :: new ( ) )
221
221
}
222
222
} ;
223
223
let visit_cx = & mut visit_cx;
@@ -344,7 +344,11 @@ impl VisitContext {
344
344
let def = self . tcx . def_map . get_copy ( & expr. id ) ;
345
345
let r = moved_variable_node_id_from_def ( def) ;
346
346
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) ;
348
352
}
349
353
}
350
354
Read => { }
You can’t perform that action at this time.
0 commit comments