File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
branches/dist-snap/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 @@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9
- refs/heads/dist-snap: 7cb234bee9dcb411031d4a0b960b2096258aa6ad
9
+ refs/heads/dist-snap: 522743c9dbf561ed026e917d9911d94fad5d19a5
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
12
12
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
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