@@ -5,7 +5,7 @@ use rustc_middle::mir::*;
55use std:: borrow:: Cow ;
66
77use super :: MaybeBorrowedLocals ;
8- use crate :: { GenKill , ResultsClonedCursor } ;
8+ use crate :: { GenKill , ResultsCursor } ;
99
1010#[ derive( Clone ) ]
1111pub struct MaybeStorageLive < ' a > {
@@ -152,22 +152,21 @@ impl<'tcx> crate::GenKillAnalysis<'tcx> for MaybeStorageDead {
152152 }
153153}
154154
155- type BorrowedLocalsResults < ' res , ' mir , ' tcx > =
156- ResultsClonedCursor < ' res , ' mir , ' tcx , MaybeBorrowedLocals > ;
155+ type BorrowedLocalsResults < ' mir , ' tcx > = ResultsCursor < ' mir , ' tcx , MaybeBorrowedLocals > ;
157156
158157/// Dataflow analysis that determines whether each local requires storage at a
159158/// given location; i.e. whether its storage can go away without being observed.
160- pub struct MaybeRequiresStorage < ' res , ' mir , ' tcx > {
161- borrowed_locals : BorrowedLocalsResults < ' res , ' mir , ' tcx > ,
159+ pub struct MaybeRequiresStorage < ' mir , ' tcx > {
160+ borrowed_locals : BorrowedLocalsResults < ' mir , ' tcx > ,
162161}
163162
164- impl < ' res , ' mir , ' tcx > MaybeRequiresStorage < ' res , ' mir , ' tcx > {
165- pub fn new ( borrowed_locals : BorrowedLocalsResults < ' res , ' mir , ' tcx > ) -> Self {
163+ impl < ' mir , ' tcx > MaybeRequiresStorage < ' mir , ' tcx > {
164+ pub fn new ( borrowed_locals : BorrowedLocalsResults < ' mir , ' tcx > ) -> Self {
166165 MaybeRequiresStorage { borrowed_locals }
167166 }
168167}
169168
170- impl < ' tcx > crate :: AnalysisDomain < ' tcx > for MaybeRequiresStorage < ' _ , ' _ , ' tcx > {
169+ impl < ' tcx > crate :: AnalysisDomain < ' tcx > for MaybeRequiresStorage < ' _ , ' tcx > {
171170 type Domain = BitSet < Local > ;
172171
173172 const NAME : & ' static str = "requires_storage" ;
@@ -186,7 +185,7 @@ impl<'tcx> crate::AnalysisDomain<'tcx> for MaybeRequiresStorage<'_, '_, 'tcx> {
186185 }
187186}
188187
189- impl < ' tcx > crate :: GenKillAnalysis < ' tcx > for MaybeRequiresStorage < ' _ , ' _ , ' tcx > {
188+ impl < ' tcx > crate :: GenKillAnalysis < ' tcx > for MaybeRequiresStorage < ' _ , ' tcx > {
190189 type Idx = Local ;
191190
192191 fn domain_size ( & self , body : & Body < ' tcx > ) -> usize {
@@ -343,7 +342,7 @@ impl<'tcx> crate::GenKillAnalysis<'tcx> for MaybeRequiresStorage<'_, '_, 'tcx> {
343342 }
344343}
345344
346- impl < ' tcx > MaybeRequiresStorage < ' _ , ' _ , ' tcx > {
345+ impl < ' tcx > MaybeRequiresStorage < ' _ , ' tcx > {
347346 /// Kill locals that are fully moved and have not been borrowed.
348347 fn check_for_move ( & mut self , trans : & mut impl GenKill < Local > , loc : Location ) {
349348 let body = self . borrowed_locals . body ( ) ;
@@ -352,12 +351,12 @@ impl<'tcx> MaybeRequiresStorage<'_, '_, 'tcx> {
352351 }
353352}
354353
355- struct MoveVisitor < ' a , ' res , ' mir , ' tcx , T > {
356- borrowed_locals : & ' a mut BorrowedLocalsResults < ' res , ' mir , ' tcx > ,
354+ struct MoveVisitor < ' a , ' mir , ' tcx , T > {
355+ borrowed_locals : & ' a mut BorrowedLocalsResults < ' mir , ' tcx > ,
357356 trans : & ' a mut T ,
358357}
359358
360- impl < ' tcx , T > Visitor < ' tcx > for MoveVisitor < ' _ , ' _ , ' _ , ' tcx , T >
359+ impl < ' tcx , T > Visitor < ' tcx > for MoveVisitor < ' _ , ' _ , ' tcx , T >
361360where
362361 T : GenKill < Local > ,
363362{
0 commit comments