@@ -33,7 +33,9 @@ impl<'a, 'tcx> BitDenotation<'tcx> for MaybeStorageLive<'a, 'tcx> {
3333    } 
3434
3535    fn  start_block_effect ( & self ,  _on_entry :  & mut  BitSet < Local > )  { 
36-         // Nothing is live on function entry 
36+         // Nothing is live on function entry (generators only have a self 
37+         // argument, and we don't care about that) 
38+         assert_eq ! ( 1 ,  self . body. arg_count) ; 
3739    } 
3840
3941    fn  statement_effect ( & self , 
@@ -72,16 +74,16 @@ impl<'a, 'tcx> BottomValue for MaybeStorageLive<'a, 'tcx> {
7274
7375/// Dataflow analysis that determines whether each local requires storage at a 
7476/// given location; i.e. whether its storage can go away without being observed. 
75- pub  struct  RequiresStorage < ' mir ,  ' tcx ,   ' b >  { 
77+ pub  struct  RequiresStorage < ' mir ,  ' tcx >  { 
7678    body :  & ' mir  Body < ' tcx > , 
7779    borrowed_locals : 
78-         RefCell < DataflowResultsRefCursor < ' mir ,  ' tcx ,  ' b ,   HaveBeenBorrowedLocals < ' mir ,  ' tcx > > > , 
80+         RefCell < DataflowResultsRefCursor < ' mir ,  ' tcx ,  HaveBeenBorrowedLocals < ' mir ,  ' tcx > > > , 
7981} 
8082
81- impl < ' mir ,  ' tcx :  ' mir ,   ' b >  RequiresStorage < ' mir ,  ' tcx ,   ' b >  { 
83+ impl < ' mir ,  ' tcx :  ' mir >  RequiresStorage < ' mir ,  ' tcx >  { 
8284    pub  fn  new ( 
8385        body :  & ' mir  Body < ' tcx > , 
84-         borrowed_locals :  & ' b  DataflowResults < ' tcx ,  HaveBeenBorrowedLocals < ' mir ,  ' tcx > > , 
86+         borrowed_locals :  & ' mir  DataflowResults < ' tcx ,  HaveBeenBorrowedLocals < ' mir ,  ' tcx > > , 
8587    )  -> Self  { 
8688        RequiresStorage  { 
8789            body, 
@@ -94,15 +96,17 @@ impl<'mir, 'tcx: 'mir, 'b> RequiresStorage<'mir, 'tcx, 'b> {
9496    } 
9597} 
9698
97- impl < ' mir ,  ' tcx ,   ' b >  BitDenotation < ' tcx >  for  RequiresStorage < ' mir ,  ' tcx ,   ' b >  { 
99+ impl < ' mir ,  ' tcx >  BitDenotation < ' tcx >  for  RequiresStorage < ' mir ,  ' tcx >  { 
98100    type  Idx  = Local ; 
99101    fn  name ( )  -> & ' static  str  {  "requires_storage"  } 
100102    fn  bits_per_block ( & self )  -> usize  { 
101103        self . body . local_decls . len ( ) 
102104    } 
103105
104106    fn  start_block_effect ( & self ,  _sets :  & mut  BitSet < Local > )  { 
105-         // Nothing is live on function entry 
107+         // Nothing is live on function entry (generators only have a self 
108+         // argument, and we don't care about that) 
109+         assert_eq ! ( 1 ,  self . body. arg_count) ; 
106110    } 
107111
108112    fn  statement_effect ( & self , 
@@ -146,7 +150,7 @@ impl<'mir, 'tcx, 'b> BitDenotation<'tcx> for RequiresStorage<'mir, 'tcx, 'b> {
146150    } 
147151} 
148152
149- impl < ' mir ,  ' tcx ,   ' b >  RequiresStorage < ' mir ,  ' tcx ,   ' b >  { 
153+ impl < ' mir ,  ' tcx >  RequiresStorage < ' mir ,  ' tcx >  { 
150154    /// Kill locals that are fully moved and have not been borrowed. 
151155     fn  check_for_move ( & self ,  sets :  & mut  GenKillSet < Local > ,  loc :  Location )  { 
152156        let  mut  visitor = MoveVisitor  { 
@@ -165,18 +169,18 @@ impl<'mir, 'tcx, 'b> RequiresStorage<'mir, 'tcx, 'b> {
165169    } 
166170} 
167171
168- impl < ' mir ,  ' tcx ,   ' b >  BottomValue  for  RequiresStorage < ' mir ,  ' tcx ,   ' b >  { 
172+ impl < ' mir ,  ' tcx >  BottomValue  for  RequiresStorage < ' mir ,  ' tcx >  { 
169173    /// bottom = dead 
170174     const  BOTTOM_VALUE :  bool  = false ; 
171175} 
172176
173- struct  MoveVisitor < ' a ,  ' b ,   ' mir ,  ' tcx >  { 
177+ struct  MoveVisitor < ' a ,  ' mir ,  ' tcx >  { 
174178    borrowed_locals : 
175-         & ' a  RefCell < DataflowResultsRefCursor < ' mir ,  ' tcx ,  ' b ,   HaveBeenBorrowedLocals < ' mir ,  ' tcx > > > , 
179+         & ' a  RefCell < DataflowResultsRefCursor < ' mir ,  ' tcx ,  HaveBeenBorrowedLocals < ' mir ,  ' tcx > > > , 
176180    sets :  & ' a  mut  GenKillSet < Local > , 
177181} 
178182
179- impl < ' a ,  ' b ,   ' mir :  ' a ,  ' tcx >  Visitor < ' tcx >  for  MoveVisitor < ' a ,   ' b ,  ' mir ,  ' tcx >  { 
183+ impl < ' a ,  ' mir :  ' a ,  ' tcx >  Visitor < ' tcx >  for  MoveVisitor < ' a ,  ' mir ,  ' tcx >  { 
180184    fn  visit_local ( & mut  self ,  local :  & Local ,  context :  PlaceContext ,  loc :  Location )  { 
181185        if  PlaceContext :: NonMutatingUse ( NonMutatingUseContext :: Move )  == context { 
182186            let  mut  borrowed_locals = self . borrowed_locals . borrow_mut ( ) ; 
0 commit comments