@@ -67,7 +67,7 @@ pub(super) fn trace<'tcx>(
67
67
}
68
68
69
69
/// Contextual state for the type-liveness coroutine.
70
- struct LivenessContext < ' a , ' typeck , ' b , ' tcx > {
70
+ struct LivenessContext < ' a , ' typeck , ' tcx > {
71
71
/// Current type-checker, giving us our inference context etc.
72
72
///
73
73
/// This also stores the body we're currently analyzing.
@@ -84,7 +84,7 @@ struct LivenessContext<'a, 'typeck, 'b, 'tcx> {
84
84
85
85
/// Results of dataflow tracking which variables (and paths) have been
86
86
/// initialized.
87
- flow_inits : ResultsCursor < ' b , ' tcx , MaybeInitializedPlaces < ' b , ' tcx > > ,
87
+ flow_inits : ResultsCursor < ' a , ' tcx , MaybeInitializedPlaces < ' a , ' tcx > > ,
88
88
89
89
/// Index indicating where each variable is assigned, used, or
90
90
/// dropped.
@@ -96,8 +96,8 @@ struct DropData<'tcx> {
96
96
region_constraint_data : Option < & ' tcx QueryRegionConstraints < ' tcx > > ,
97
97
}
98
98
99
- struct LivenessResults < ' a , ' typeck , ' b , ' tcx > {
100
- cx : LivenessContext < ' a , ' typeck , ' b , ' tcx > ,
99
+ struct LivenessResults < ' a , ' typeck , ' tcx > {
100
+ cx : LivenessContext < ' a , ' typeck , ' tcx > ,
101
101
102
102
/// Set of points that define the current local.
103
103
defs : DenseBitSet < PointIndex > ,
@@ -118,8 +118,8 @@ struct LivenessResults<'a, 'typeck, 'b, 'tcx> {
118
118
stack : Vec < PointIndex > ,
119
119
}
120
120
121
- impl < ' a , ' typeck , ' b , ' tcx > LivenessResults < ' a , ' typeck , ' b , ' tcx > {
122
- fn new ( cx : LivenessContext < ' a , ' typeck , ' b , ' tcx > ) -> Self {
121
+ impl < ' a , ' typeck , ' tcx > LivenessResults < ' a , ' typeck , ' tcx > {
122
+ fn new ( cx : LivenessContext < ' a , ' typeck , ' tcx > ) -> Self {
123
123
let num_points = cx. location_map . num_points ( ) ;
124
124
LivenessResults {
125
125
cx,
@@ -461,10 +461,11 @@ impl<'a, 'typeck, 'b, 'tcx> LivenessResults<'a, 'typeck, 'b, 'tcx> {
461
461
}
462
462
}
463
463
464
- impl < ' tcx > LivenessContext < ' _ , ' _ , ' _ , ' tcx > {
464
+ impl < ' tcx > LivenessContext < ' _ , ' _ , ' tcx > {
465
465
fn body ( & self ) -> & Body < ' tcx > {
466
466
self . typeck . body
467
467
}
468
+
468
469
/// Returns `true` if the local variable (or some part of it) is initialized at the current
469
470
/// cursor position. Callers should call one of the `seek` methods immediately before to point
470
471
/// the cursor to the desired location.
0 commit comments