Skip to content

Commit 10d39f5

Browse files
committed
remove unneeded lifetime
1 parent 4519788 commit 10d39f5

File tree

1 file changed

+8
-7
lines changed
  • compiler/rustc_borrowck/src/type_check/liveness

1 file changed

+8
-7
lines changed

compiler/rustc_borrowck/src/type_check/liveness/trace.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub(super) fn trace<'tcx>(
6767
}
6868

6969
/// Contextual state for the type-liveness coroutine.
70-
struct LivenessContext<'a, 'typeck, 'b, 'tcx> {
70+
struct LivenessContext<'a, 'typeck, 'tcx> {
7171
/// Current type-checker, giving us our inference context etc.
7272
///
7373
/// This also stores the body we're currently analyzing.
@@ -84,7 +84,7 @@ struct LivenessContext<'a, 'typeck, 'b, 'tcx> {
8484

8585
/// Results of dataflow tracking which variables (and paths) have been
8686
/// initialized.
87-
flow_inits: ResultsCursor<'b, 'tcx, MaybeInitializedPlaces<'b, 'tcx>>,
87+
flow_inits: ResultsCursor<'a, 'tcx, MaybeInitializedPlaces<'a, 'tcx>>,
8888

8989
/// Index indicating where each variable is assigned, used, or
9090
/// dropped.
@@ -96,8 +96,8 @@ struct DropData<'tcx> {
9696
region_constraint_data: Option<&'tcx QueryRegionConstraints<'tcx>>,
9797
}
9898

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>,
101101

102102
/// Set of points that define the current local.
103103
defs: DenseBitSet<PointIndex>,
@@ -118,8 +118,8 @@ struct LivenessResults<'a, 'typeck, 'b, 'tcx> {
118118
stack: Vec<PointIndex>,
119119
}
120120

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 {
123123
let num_points = cx.location_map.num_points();
124124
LivenessResults {
125125
cx,
@@ -461,10 +461,11 @@ impl<'a, 'typeck, 'b, 'tcx> LivenessResults<'a, 'typeck, 'b, 'tcx> {
461461
}
462462
}
463463

464-
impl<'tcx> LivenessContext<'_, '_, '_, 'tcx> {
464+
impl<'tcx> LivenessContext<'_, '_, 'tcx> {
465465
fn body(&self) -> &Body<'tcx> {
466466
self.typeck.body
467467
}
468+
468469
/// Returns `true` if the local variable (or some part of it) is initialized at the current
469470
/// cursor position. Callers should call one of the `seek` methods immediately before to point
470471
/// the cursor to the desired location.

0 commit comments

Comments
 (0)