Skip to content

Commit c6111c0

Browse files
committed
Remove the 'body lifetime on FilterInformation.
It's not needed.
1 parent bf662eb commit c6111c0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

compiler/rustc_mir_transform/src/dest_prop.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,8 @@ impl<'a, 'tcx> MutVisitor<'tcx> for Merger<'a, 'tcx> {
359359
//
360360
// This section enforces bullet point 2
361361

362-
struct FilterInformation<'a, 'body, 'alloc, 'tcx> {
363-
body: &'body Body<'tcx>,
362+
struct FilterInformation<'a, 'alloc, 'tcx> {
363+
body: &'a Body<'tcx>,
364364
points: &'a DenseLocationMap,
365365
live: &'a SparseIntervalMatrix<Local, PointIndex>,
366366
candidates: &'a mut Candidates<'alloc>,
@@ -446,7 +446,7 @@ enum CandidateFilter {
446446
Remove,
447447
}
448448

449-
impl<'a, 'body, 'alloc, 'tcx> FilterInformation<'a, 'body, 'alloc, 'tcx> {
449+
impl<'a, 'alloc, 'tcx> FilterInformation<'a, 'alloc, 'tcx> {
450450
/// Filters the set of candidates to remove those that conflict.
451451
///
452452
/// The steps we take are exactly those that are outlined at the top of the file. For each
@@ -464,12 +464,12 @@ impl<'a, 'body, 'alloc, 'tcx> FilterInformation<'a, 'body, 'alloc, 'tcx> {
464464
/// before the statement/terminator will correctly report locals that are read in the
465465
/// statement/terminator to be live. We are additionally conservative by treating all written to
466466
/// locals as also being read from.
467-
fn filter_liveness<'b>(
467+
fn filter_liveness(
468468
candidates: &mut Candidates<'alloc>,
469469
points: &DenseLocationMap,
470470
live: &SparseIntervalMatrix<Local, PointIndex>,
471-
write_info_alloc: &'alloc mut WriteInfo,
472-
body: &'b Body<'tcx>,
471+
write_info: &'alloc mut WriteInfo,
472+
body: &Body<'tcx>,
473473
) {
474474
let mut this = FilterInformation {
475475
body,
@@ -478,7 +478,7 @@ impl<'a, 'body, 'alloc, 'tcx> FilterInformation<'a, 'body, 'alloc, 'tcx> {
478478
candidates,
479479
// We don't actually store anything at this scope, we just keep things here to be able
480480
// to reuse the allocation.
481-
write_info: write_info_alloc,
481+
write_info,
482482
// Doesn't matter what we put here, will be overwritten before being used
483483
at: Location::START,
484484
};
@@ -820,9 +820,9 @@ fn is_local_required(local: Local, body: &Body<'_>) -> bool {
820820
/////////////////////////////////////////////////////////
821821
// MIR Dump
822822

823-
fn dest_prop_mir_dump<'body, 'tcx>(
823+
fn dest_prop_mir_dump<'tcx>(
824824
tcx: TyCtxt<'tcx>,
825-
body: &'body Body<'tcx>,
825+
body: &Body<'tcx>,
826826
points: &DenseLocationMap,
827827
live: &SparseIntervalMatrix<Local, PointIndex>,
828828
round: usize,

0 commit comments

Comments
 (0)