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.

Required Associated Types§

Required Methods§

Creates 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.

source

fn reset_to_block_entry(&self, state: &mut Self::FlowState, block: BasicBlock)

Implementors§