@@ -53,10 +53,6 @@ pub struct MoveData<'tcx> {
53
53
/// kill move bits.
54
54
pub path_assignments : RefCell < Vec < Assignment > > ,
55
55
56
- /// Enum variant matched within a pattern on some match arm, like
57
- /// `SomeStruct{ f: Variant1(x, y) } => ...`
58
- pub variant_matches : RefCell < Vec < VariantMatch > > ,
59
-
60
56
/// Assignments to a variable or path, like `x = foo`, but not `x += foo`.
61
57
pub assignee_ids : RefCell < NodeSet > ,
62
58
}
@@ -161,21 +157,6 @@ pub struct Assignment {
161
157
pub assignee_id : ast:: NodeId ,
162
158
}
163
159
164
- #[ derive( Copy , Clone ) ]
165
- pub struct VariantMatch {
166
- /// downcast to the variant.
167
- pub path : MovePathIndex ,
168
-
169
- /// path being downcast to the variant.
170
- pub base_path : MovePathIndex ,
171
-
172
- /// id where variant's pattern occurs
173
- pub id : ast:: NodeId ,
174
-
175
- /// says if variant established by move (and why), by copy, or by borrow.
176
- pub mode : euv:: MatchMode
177
- }
178
-
179
160
#[ derive( Clone , Copy ) ]
180
161
pub struct MoveDataFlowOperator ;
181
162
@@ -215,7 +196,6 @@ impl<'a, 'tcx> MoveData<'tcx> {
215
196
moves : RefCell :: new ( Vec :: new ( ) ) ,
216
197
path_assignments : RefCell :: new ( Vec :: new ( ) ) ,
217
198
var_assignments : RefCell :: new ( Vec :: new ( ) ) ,
218
- variant_matches : RefCell :: new ( Vec :: new ( ) ) ,
219
199
assignee_ids : RefCell :: new ( NodeSet ( ) ) ,
220
200
}
221
201
}
@@ -485,31 +465,6 @@ impl<'a, 'tcx> MoveData<'tcx> {
485
465
}
486
466
}
487
467
488
- /// Adds a new record for a match of `base_lp`, downcast to
489
- /// variant `lp`, that occurs at location `pattern_id`. (One
490
- /// should be able to recover the span info from the
491
- /// `pattern_id` and the hir_map, I think.)
492
- pub fn add_variant_match ( & self , tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
493
- lp : Rc < LoanPath < ' tcx > > ,
494
- pattern_id : ast:: NodeId ,
495
- base_lp : Rc < LoanPath < ' tcx > > ,
496
- mode : euv:: MatchMode ) {
497
- debug ! ( "add_variant_match(lp={:?}, pattern_id={})" ,
498
- lp, pattern_id) ;
499
-
500
- let path_index = self . move_path ( tcx, lp. clone ( ) ) ;
501
- let base_path_index = self . move_path ( tcx, base_lp. clone ( ) ) ;
502
-
503
- let variant_match = VariantMatch {
504
- path : path_index,
505
- base_path : base_path_index,
506
- id : pattern_id,
507
- mode,
508
- } ;
509
-
510
- self . variant_matches . borrow_mut ( ) . push ( variant_match) ;
511
- }
512
-
513
468
/// Adds the gen/kills for the various moves and
514
469
/// assignments into the provided data flow contexts.
515
470
/// Moves are generated by moves and killed by assignments and
0 commit comments