Trait rustc_mir::dataflow::framework::visitor::ResultsVisitable [−][src]
pub trait ResultsVisitable<'tcx> {
type Direction: Direction;
type FlowState;
fn new_flow_state(&self, body: &Body<'tcx>) -> Self::FlowState;
fn reset_to_block_entry(
&self,
state: &mut Self::FlowState,
block: BasicBlock
);
fn reconstruct_before_statement_effect(
&self,
state: &mut Self::FlowState,
statement: &Statement<'tcx>,
location: Location
);
fn reconstruct_statement_effect(
&self,
state: &mut Self::FlowState,
statement: &Statement<'tcx>,
location: Location
);
fn reconstruct_before_terminator_effect(
&self,
state: &mut Self::FlowState,
terminator: &Terminator<'tcx>,
location: Location
);
fn reconstruct_terminator_effect(
&self,
state: &mut Self::FlowState,
terminator: &Terminator<'tcx>,
location: Location
);
}Expand description
Things that can be visited by a ResultsVisitor.
This trait exists so that we can visit the results of multiple dataflow analyses simultaneously.
DO NOT IMPLEMENT MANUALLY. Instead, use the impl_visitable macro below.
Associated Types
Required methods
fn new_flow_state(&self, body: &Body<'tcx>) -> Self::FlowState
fn new_flow_state(&self, body: &Body<'tcx>) -> Self::FlowStateCreates an empty FlowState to hold the transient state for these dataflow results.
The value of the newly created FlowState will be overwritten by reset_to_block_entry
before it can be observed by a ResultsVisitor.
fn reset_to_block_entry(&self, state: &mut Self::FlowState, block: BasicBlock)fn reconstruct_before_statement_effect(
&self,
state: &mut Self::FlowState,
statement: &Statement<'tcx>,
location: Location
)fn reconstruct_statement_effect(
&self,
state: &mut Self::FlowState,
statement: &Statement<'tcx>,
location: Location
)fn reconstruct_before_terminator_effect(
&self,
state: &mut Self::FlowState,
terminator: &Terminator<'tcx>,
location: Location
)fn reconstruct_terminator_effect(
&self,
state: &mut Self::FlowState,
terminator: &Terminator<'tcx>,
location: Location
)Implementors
impl<'tcx, B, U, E, D: Direction> ResultsVisitable<'tcx> for BorrowckAnalyses<Results<'tcx, B>, Results<'tcx, U>, Results<'tcx, E>> where
B: Analysis<'tcx, Direction = D>,
U: Analysis<'tcx, Direction = D>,
E: Analysis<'tcx, Direction = D>,