Rollup merge of #115488 - Jarcho:mut_result_visitor, r=oli-obk

Take `&mut Results` in `ResultsVisitor`

This fixes a small oversight from #108293.
This commit is contained in:
Matthias Krüger 2023-09-05 07:15:15 +02:00 committed by GitHub
commit e9d15ec2cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 20 deletions

View file

@ -603,7 +603,7 @@ impl<'cx, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx, R> for MirBorro
fn visit_statement_before_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
flow_state: &Flows<'cx, 'tcx>,
stmt: &'cx Statement<'tcx>,
location: Location,
@ -673,7 +673,7 @@ fn visit_statement_before_primary_effect(
fn visit_terminator_before_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
flow_state: &Flows<'cx, 'tcx>,
term: &'cx Terminator<'tcx>,
loc: Location,
@ -784,7 +784,7 @@ fn visit_terminator_before_primary_effect(
fn visit_terminator_after_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
flow_state: &Flows<'cx, 'tcx>,
term: &'cx Terminator<'tcx>,
loc: Location,

View file

@ -538,7 +538,7 @@ impl<'tcx, A> ResultsVisitor<'_, 'tcx, Results<'tcx, A>> for StateDiffCollector<
fn visit_block_start(
&mut self,
_results: &Results<'tcx, A>,
_results: &mut Results<'tcx, A>,
state: &Self::FlowState,
_block_data: &mir::BasicBlockData<'tcx>,
_block: BasicBlock,
@ -550,7 +550,7 @@ fn visit_block_start(
fn visit_block_end(
&mut self,
_results: &Results<'tcx, A>,
_results: &mut Results<'tcx, A>,
state: &Self::FlowState,
_block_data: &mir::BasicBlockData<'tcx>,
_block: BasicBlock,
@ -562,7 +562,7 @@ fn visit_block_end(
fn visit_statement_before_primary_effect(
&mut self,
results: &Results<'tcx, A>,
results: &mut Results<'tcx, A>,
state: &Self::FlowState,
_statement: &mir::Statement<'tcx>,
_location: Location,
@ -575,7 +575,7 @@ fn visit_statement_before_primary_effect(
fn visit_statement_after_primary_effect(
&mut self,
results: &Results<'tcx, A>,
results: &mut Results<'tcx, A>,
state: &Self::FlowState,
_statement: &mir::Statement<'tcx>,
_location: Location,
@ -586,7 +586,7 @@ fn visit_statement_after_primary_effect(
fn visit_terminator_before_primary_effect(
&mut self,
results: &Results<'tcx, A>,
results: &mut Results<'tcx, A>,
state: &Self::FlowState,
_terminator: &mir::Terminator<'tcx>,
_location: Location,
@ -599,7 +599,7 @@ fn visit_terminator_before_primary_effect(
fn visit_terminator_after_primary_effect(
&mut self,
results: &Results<'tcx, A>,
results: &mut Results<'tcx, A>,
state: &Self::FlowState,
_terminator: &mir::Terminator<'tcx>,
_location: Location,

View file

@ -35,7 +35,7 @@ pub trait ResultsVisitor<'mir, 'tcx, R> {
fn visit_block_start(
&mut self,
_results: &R,
_results: &mut R,
_state: &Self::FlowState,
_block_data: &'mir mir::BasicBlockData<'tcx>,
_block: BasicBlock,
@ -46,7 +46,7 @@ fn visit_block_start(
/// its `statement_effect`.
fn visit_statement_before_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
_state: &Self::FlowState,
_statement: &'mir mir::Statement<'tcx>,
_location: Location,
@ -57,7 +57,7 @@ fn visit_statement_before_primary_effect(
/// statement applied to `state`.
fn visit_statement_after_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
_state: &Self::FlowState,
_statement: &'mir mir::Statement<'tcx>,
_location: Location,
@ -68,7 +68,7 @@ fn visit_statement_after_primary_effect(
/// its `terminator_effect`.
fn visit_terminator_before_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
_state: &Self::FlowState,
_terminator: &'mir mir::Terminator<'tcx>,
_location: Location,
@ -81,7 +81,7 @@ fn visit_terminator_before_primary_effect(
/// The `call_return_effect` (if one exists) will *not* be applied to `state`.
fn visit_terminator_after_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
_state: &Self::FlowState,
_terminator: &'mir mir::Terminator<'tcx>,
_location: Location,
@ -90,7 +90,7 @@ fn visit_terminator_after_primary_effect(
fn visit_block_end(
&mut self,
_results: &R,
_results: &mut R,
_state: &Self::FlowState,
_block_data: &'mir mir::BasicBlockData<'tcx>,
_block: BasicBlock,

View file

@ -401,7 +401,7 @@ impl<'mir, 'tcx>
fn visit_statement_before_primary_effect(
&mut self,
results: &Results<'tcx, ValueAnalysisWrapper<ConstAnalysis<'_, 'tcx>>>,
results: &mut Results<'tcx, ValueAnalysisWrapper<ConstAnalysis<'_, 'tcx>>>,
state: &Self::FlowState,
statement: &'mir Statement<'tcx>,
location: Location,
@ -417,7 +417,7 @@ fn visit_statement_before_primary_effect(
fn visit_statement_after_primary_effect(
&mut self,
results: &Results<'tcx, ValueAnalysisWrapper<ConstAnalysis<'_, 'tcx>>>,
results: &mut Results<'tcx, ValueAnalysisWrapper<ConstAnalysis<'_, 'tcx>>>,
state: &Self::FlowState,
statement: &'mir Statement<'tcx>,
location: Location,
@ -443,7 +443,7 @@ fn visit_statement_after_primary_effect(
fn visit_terminator_before_primary_effect(
&mut self,
results: &Results<'tcx, ValueAnalysisWrapper<ConstAnalysis<'_, 'tcx>>>,
results: &mut Results<'tcx, ValueAnalysisWrapper<ConstAnalysis<'_, 'tcx>>>,
state: &Self::FlowState,
terminator: &'mir Terminator<'tcx>,
location: Location,

View file

@ -814,7 +814,7 @@ impl<'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R>
fn visit_statement_before_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
state: &Self::FlowState,
_statement: &'mir Statement<'tcx>,
loc: Location,
@ -824,7 +824,7 @@ fn visit_statement_before_primary_effect(
fn visit_terminator_before_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
state: &Self::FlowState,
_terminator: &'mir Terminator<'tcx>,
loc: Location,