@@ -5,7 +5,7 @@ use rustc_middle::mir::*;
5
5
use std:: borrow:: Cow ;
6
6
7
7
use super :: MaybeBorrowedLocals ;
8
- use crate :: { GenKill , ResultsClonedCursor } ;
8
+ use crate :: { GenKill , ResultsCursor } ;
9
9
10
10
#[ derive( Clone ) ]
11
11
pub struct MaybeStorageLive < ' a > {
@@ -152,22 +152,21 @@ impl<'tcx> crate::GenKillAnalysis<'tcx> for MaybeStorageDead {
152
152
}
153
153
}
154
154
155
- type BorrowedLocalsResults < ' res , ' mir , ' tcx > =
156
- ResultsClonedCursor < ' res , ' mir , ' tcx , MaybeBorrowedLocals > ;
155
+ type BorrowedLocalsResults < ' mir , ' tcx > = ResultsCursor < ' mir , ' tcx , MaybeBorrowedLocals > ;
157
156
158
157
/// Dataflow analysis that determines whether each local requires storage at a
159
158
/// 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 > ,
162
161
}
163
162
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 {
166
165
MaybeRequiresStorage { borrowed_locals }
167
166
}
168
167
}
169
168
170
- impl < ' tcx > crate :: AnalysisDomain < ' tcx > for MaybeRequiresStorage < ' _ , ' _ , ' tcx > {
169
+ impl < ' tcx > crate :: AnalysisDomain < ' tcx > for MaybeRequiresStorage < ' _ , ' tcx > {
171
170
type Domain = BitSet < Local > ;
172
171
173
172
const NAME : & ' static str = "requires_storage" ;
@@ -186,7 +185,7 @@ impl<'tcx> crate::AnalysisDomain<'tcx> for MaybeRequiresStorage<'_, '_, 'tcx> {
186
185
}
187
186
}
188
187
189
- impl < ' tcx > crate :: GenKillAnalysis < ' tcx > for MaybeRequiresStorage < ' _ , ' _ , ' tcx > {
188
+ impl < ' tcx > crate :: GenKillAnalysis < ' tcx > for MaybeRequiresStorage < ' _ , ' tcx > {
190
189
type Idx = Local ;
191
190
192
191
fn domain_size ( & self , body : & Body < ' tcx > ) -> usize {
@@ -343,7 +342,7 @@ impl<'tcx> crate::GenKillAnalysis<'tcx> for MaybeRequiresStorage<'_, '_, 'tcx> {
343
342
}
344
343
}
345
344
346
- impl < ' tcx > MaybeRequiresStorage < ' _ , ' _ , ' tcx > {
345
+ impl < ' tcx > MaybeRequiresStorage < ' _ , ' tcx > {
347
346
/// Kill locals that are fully moved and have not been borrowed.
348
347
fn check_for_move ( & mut self , trans : & mut impl GenKill < Local > , loc : Location ) {
349
348
let body = self . borrowed_locals . body ( ) ;
@@ -352,12 +351,12 @@ impl<'tcx> MaybeRequiresStorage<'_, '_, 'tcx> {
352
351
}
353
352
}
354
353
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 > ,
357
356
trans : & ' a mut T ,
358
357
}
359
358
360
- impl < ' tcx , T > Visitor < ' tcx > for MoveVisitor < ' _ , ' _ , ' _ , ' tcx , T >
359
+ impl < ' tcx , T > Visitor < ' tcx > for MoveVisitor < ' _ , ' _ , ' tcx , T >
361
360
where
362
361
T : GenKill < Local > ,
363
362
{
0 commit comments