@@ -17,10 +17,8 @@ use dataflow::{DataFlowContext, BitwiseOperator, DataFlowOperator, KillFrom};
1717
1818use borrowck:: * ;
1919use rustc:: cfg;
20- use rustc:: middle:: expr_use_visitor as euv;
21- use rustc:: middle:: expr_use_visitor:: MutateMode ;
2220use rustc:: ty:: { self , TyCtxt } ;
23- use rustc:: util:: nodemap:: { FxHashMap , FxHashSet } ;
21+ use rustc:: util:: nodemap:: FxHashMap ;
2422
2523use std:: cell:: RefCell ;
2624use std:: rc:: Rc ;
@@ -49,9 +47,6 @@ pub struct MoveData<'tcx> {
4947 /// assigned dataflow bits, but we track them because they still
5048 /// kill move bits.
5149 pub path_assignments : RefCell < Vec < Assignment > > ,
52-
53- /// Assignments to a variable or path, like `x = foo`, but not `x += foo`.
54- pub assignee_ids : RefCell < FxHashSet < hir:: ItemLocalId > > ,
5550}
5651
5752pub struct FlowedMoveData < ' a , ' tcx : ' a > {
@@ -149,9 +144,6 @@ pub struct Assignment {
149144
150145 /// span of node where assignment occurs
151146 pub span : Span ,
152-
153- /// id for place expression on lhs of assignment
154- pub assignee_id : hir:: ItemLocalId ,
155147}
156148
157149#[ derive( Clone , Copy ) ]
@@ -386,9 +378,7 @@ impl<'a, 'tcx> MoveData<'tcx> {
386378 pub fn add_assignment ( & self , tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
387379 lp : Rc < LoanPath < ' tcx > > ,
388380 assign_id : hir:: ItemLocalId ,
389- span : Span ,
390- assignee_id : hir:: ItemLocalId ,
391- mode : euv:: MutateMode ) {
381+ span : Span ) {
392382 // Assigning to one union field automatically assigns to all its fields.
393383 if let LpExtend ( ref base_lp, mutbl, LpInterior ( opt_variant_id, interior) ) = lp. kind {
394384 if let ty:: TyAdt ( adt_def, _) = base_lp. ty . sty {
@@ -405,39 +395,28 @@ impl<'a, 'tcx> MoveData<'tcx> {
405395 LpInterior ( opt_variant_id, field) ) ;
406396 let sibling_lp = Rc :: new ( LoanPath :: new ( sibling_lp_kind, field_ty) ) ;
407397 self . add_assignment_helper ( tcx, sibling_lp, assign_id,
408- span, assignee_id , mode ) ;
398+ span) ;
409399 }
410400 return ;
411401 }
412402 }
413403 }
414404
415- self . add_assignment_helper ( tcx, lp. clone ( ) , assign_id, span, assignee_id , mode ) ;
405+ self . add_assignment_helper ( tcx, lp. clone ( ) , assign_id, span) ;
416406 }
417407
418408 fn add_assignment_helper ( & self , tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
419409 lp : Rc < LoanPath < ' tcx > > ,
420410 assign_id : hir:: ItemLocalId ,
421- span : Span ,
422- assignee_id : hir:: ItemLocalId ,
423- mode : euv:: MutateMode ) {
424- debug ! ( "add_assignment(lp={:?}, assign_id={:?}, assignee_id={:?}" ,
425- lp, assign_id, assignee_id) ;
411+ span : Span ) {
412+ debug ! ( "add_assignment(lp={:?}, assign_id={:?}" , lp, assign_id) ;
426413
427414 let path_index = self . move_path ( tcx, lp. clone ( ) ) ;
428415
429- match mode {
430- MutateMode :: Init | MutateMode :: JustWrite => {
431- self . assignee_ids . borrow_mut ( ) . insert ( assignee_id) ;
432- }
433- MutateMode :: WriteAndRead => { }
434- }
435-
436416 let assignment = Assignment {
437417 path : path_index,
438418 id : assign_id,
439419 span,
440- assignee_id,
441420 } ;
442421
443422 if self . is_var_path ( path_index) {
0 commit comments