Skip to content

Commit 5c35027

Browse files
committed
Remove unnecessary lifetime from StorageConflictVisitor.
1 parent 0b032f8 commit 5c35027

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

compiler/rustc_mir_transform/src/coroutine.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -872,26 +872,26 @@ fn compute_storage_conflicts<'mir, 'tcx>(
872872
storage_conflicts
873873
}
874874

875-
struct StorageConflictVisitor<'mir, 'tcx, 's> {
876-
body: &'mir Body<'tcx>,
877-
saved_locals: &'s CoroutineSavedLocals,
875+
struct StorageConflictVisitor<'a, 'tcx> {
876+
body: &'a Body<'tcx>,
877+
saved_locals: &'a CoroutineSavedLocals,
878878
// FIXME(tmandry): Consider using sparse bitsets here once we have good
879879
// benchmarks for coroutines.
880880
local_conflicts: BitMatrix<Local, Local>,
881881
// We keep this bitset as a buffer to avoid reallocating memory.
882882
eligible_storage_live: BitSet<Local>,
883883
}
884884

885-
impl<'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R>
886-
for StorageConflictVisitor<'mir, 'tcx, '_>
885+
impl<'a, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'a, 'tcx, R>
886+
for StorageConflictVisitor<'a, 'tcx>
887887
{
888888
type FlowState = BitSet<Local>;
889889

890890
fn visit_statement_before_primary_effect(
891891
&mut self,
892892
_results: &mut R,
893893
state: &Self::FlowState,
894-
_statement: &'mir Statement<'tcx>,
894+
_statement: &'a Statement<'tcx>,
895895
loc: Location,
896896
) {
897897
self.apply_state(state, loc);
@@ -901,14 +901,14 @@ impl<'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R>
901901
&mut self,
902902
_results: &mut R,
903903
state: &Self::FlowState,
904-
_terminator: &'mir Terminator<'tcx>,
904+
_terminator: &'a Terminator<'tcx>,
905905
loc: Location,
906906
) {
907907
self.apply_state(state, loc);
908908
}
909909
}
910910

911-
impl StorageConflictVisitor<'_, '_, '_> {
911+
impl StorageConflictVisitor<'_, '_> {
912912
fn apply_state(&mut self, flow_state: &BitSet<Local>, loc: Location) {
913913
// Ignore unreachable blocks.
914914
if let TerminatorKind::Unreachable = self.body.basic_blocks[loc.block].terminator().kind {

0 commit comments

Comments
 (0)