Remove unnecessary lifetime from StorageConflictVisitor
.
This commit is contained in:
parent
0b032f8f83
commit
5c3502772a
@ -872,9 +872,9 @@ fn compute_storage_conflicts<'mir, 'tcx>(
|
|||||||
storage_conflicts
|
storage_conflicts
|
||||||
}
|
}
|
||||||
|
|
||||||
struct StorageConflictVisitor<'mir, 'tcx, 's> {
|
struct StorageConflictVisitor<'a, 'tcx> {
|
||||||
body: &'mir Body<'tcx>,
|
body: &'a Body<'tcx>,
|
||||||
saved_locals: &'s CoroutineSavedLocals,
|
saved_locals: &'a CoroutineSavedLocals,
|
||||||
// FIXME(tmandry): Consider using sparse bitsets here once we have good
|
// FIXME(tmandry): Consider using sparse bitsets here once we have good
|
||||||
// benchmarks for coroutines.
|
// benchmarks for coroutines.
|
||||||
local_conflicts: BitMatrix<Local, Local>,
|
local_conflicts: BitMatrix<Local, Local>,
|
||||||
@ -882,8 +882,8 @@ struct StorageConflictVisitor<'mir, 'tcx, 's> {
|
|||||||
eligible_storage_live: BitSet<Local>,
|
eligible_storage_live: BitSet<Local>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R>
|
impl<'a, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'a, 'tcx, R>
|
||||||
for StorageConflictVisitor<'mir, 'tcx, '_>
|
for StorageConflictVisitor<'a, 'tcx>
|
||||||
{
|
{
|
||||||
type FlowState = BitSet<Local>;
|
type FlowState = BitSet<Local>;
|
||||||
|
|
||||||
@ -891,7 +891,7 @@ impl<'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R>
|
|||||||
&mut self,
|
&mut self,
|
||||||
_results: &mut R,
|
_results: &mut R,
|
||||||
state: &Self::FlowState,
|
state: &Self::FlowState,
|
||||||
_statement: &'mir Statement<'tcx>,
|
_statement: &'a Statement<'tcx>,
|
||||||
loc: Location,
|
loc: Location,
|
||||||
) {
|
) {
|
||||||
self.apply_state(state, loc);
|
self.apply_state(state, loc);
|
||||||
@ -901,14 +901,14 @@ impl<'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R>
|
|||||||
&mut self,
|
&mut self,
|
||||||
_results: &mut R,
|
_results: &mut R,
|
||||||
state: &Self::FlowState,
|
state: &Self::FlowState,
|
||||||
_terminator: &'mir Terminator<'tcx>,
|
_terminator: &'a Terminator<'tcx>,
|
||||||
loc: Location,
|
loc: Location,
|
||||||
) {
|
) {
|
||||||
self.apply_state(state, loc);
|
self.apply_state(state, loc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl StorageConflictVisitor<'_, '_, '_> {
|
impl StorageConflictVisitor<'_, '_> {
|
||||||
fn apply_state(&mut self, flow_state: &BitSet<Local>, loc: Location) {
|
fn apply_state(&mut self, flow_state: &BitSet<Local>, loc: Location) {
|
||||||
// Ignore unreachable blocks.
|
// Ignore unreachable blocks.
|
||||||
if let TerminatorKind::Unreachable = self.body.basic_blocks[loc.block].terminator().kind {
|
if let TerminatorKind::Unreachable = self.body.basic_blocks[loc.block].terminator().kind {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user