@@ -53,10 +53,6 @@ pub struct MoveData<'tcx> {
5353 /// kill move bits.
5454 pub path_assignments : RefCell < Vec < Assignment > > ,
5555
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-
6056 /// Assignments to a variable or path, like `x = foo`, but not `x += foo`.
6157 pub assignee_ids : RefCell < NodeSet > ,
6258}
@@ -161,21 +157,6 @@ pub struct Assignment {
161157 pub assignee_id : ast:: NodeId ,
162158}
163159
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-
179160#[ derive( Clone , Copy ) ]
180161pub struct MoveDataFlowOperator ;
181162
@@ -215,7 +196,6 @@ impl<'a, 'tcx> MoveData<'tcx> {
215196 moves : RefCell :: new ( Vec :: new ( ) ) ,
216197 path_assignments : RefCell :: new ( Vec :: new ( ) ) ,
217198 var_assignments : RefCell :: new ( Vec :: new ( ) ) ,
218- variant_matches : RefCell :: new ( Vec :: new ( ) ) ,
219199 assignee_ids : RefCell :: new ( NodeSet ( ) ) ,
220200 }
221201 }
@@ -485,31 +465,6 @@ impl<'a, 'tcx> MoveData<'tcx> {
485465 }
486466 }
487467
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-
513468 /// Adds the gen/kills for the various moves and
514469 /// assignments into the provided data flow contexts.
515470 /// Moves are generated by moves and killed by assignments and
0 commit comments