pub trait ValueAnalysis<'tcx> {
    type Value: Clone + JoinSemiLattice + HasBottom + HasTop;

    const NAME: &'static str;
Show 22 methods // Required method fn map(&self) -> &Map; // Provided methods fn handle_statement( &self, statement: &Statement<'tcx>, state: &mut State<Self::Value>, ) { ... } fn super_statement( &self, statement: &Statement<'tcx>, state: &mut State<Self::Value>, ) { ... } fn handle_set_discriminant( &self, place: Place<'tcx>, variant_index: VariantIdx, state: &mut State<Self::Value>, ) { ... } fn super_set_discriminant( &self, place: Place<'tcx>, _variant_index: VariantIdx, state: &mut State<Self::Value>, ) { ... } fn handle_intrinsic( &self, intrinsic: &NonDivergingIntrinsic<'tcx>, state: &mut State<Self::Value>, ) { ... } fn super_intrinsic( &self, intrinsic: &NonDivergingIntrinsic<'tcx>, _state: &mut State<Self::Value>, ) { ... } fn handle_assign( &self, target: Place<'tcx>, rvalue: &Rvalue<'tcx>, state: &mut State<Self::Value>, ) { ... } fn super_assign( &self, target: Place<'tcx>, rvalue: &Rvalue<'tcx>, state: &mut State<Self::Value>, ) { ... } fn handle_rvalue( &self, rvalue: &Rvalue<'tcx>, state: &mut State<Self::Value>, ) -> ValueOrPlace<Self::Value> { ... } fn super_rvalue( &self, rvalue: &Rvalue<'tcx>, state: &mut State<Self::Value>, ) -> ValueOrPlace<Self::Value> { ... } fn handle_operand( &self, operand: &Operand<'tcx>, state: &mut State<Self::Value>, ) -> ValueOrPlace<Self::Value> { ... } fn super_operand( &self, operand: &Operand<'tcx>, state: &mut State<Self::Value>, ) -> ValueOrPlace<Self::Value> { ... } fn handle_constant( &self, constant: &ConstOperand<'tcx>, state: &mut State<Self::Value>, ) -> Self::Value { ... } fn super_constant( &self, _constant: &ConstOperand<'tcx>, _state: &mut State<Self::Value>, ) -> Self::Value { ... } fn handle_terminator<'mir>( &self, terminator: &'mir Terminator<'tcx>, state: &mut State<Self::Value>, ) -> TerminatorEdges<'mir, 'tcx> { ... } fn super_terminator<'mir>( &self, terminator: &'mir Terminator<'tcx>, state: &mut State<Self::Value>, ) -> TerminatorEdges<'mir, 'tcx> { ... } fn handle_call_return( &self, return_places: CallReturnPlaces<'_, 'tcx>, state: &mut State<Self::Value>, ) { ... } fn super_call_return( &self, return_places: CallReturnPlaces<'_, 'tcx>, state: &mut State<Self::Value>, ) { ... } fn handle_switch_int<'mir>( &self, discr: &'mir Operand<'tcx>, targets: &'mir SwitchTargets, state: &mut State<Self::Value>, ) -> TerminatorEdges<'mir, 'tcx> { ... } fn super_switch_int<'mir>( &self, discr: &'mir Operand<'tcx>, targets: &'mir SwitchTargets, _state: &mut State<Self::Value>, ) -> TerminatorEdges<'mir, 'tcx> { ... } fn wrap(self) -> ValueAnalysisWrapper<Self> where Self: Sized { ... }
}

Required Associated Types§

source

type Value: Clone + JoinSemiLattice + HasBottom + HasTop

For each place of interest, the analysis tracks a value of the given type.

Required Associated Constants§

source

const NAME: &'static str

Required Methods§

source

fn map(&self) -> &Map

Provided Methods§

source

fn handle_statement( &self, statement: &Statement<'tcx>, state: &mut State<Self::Value>, )

source

fn super_statement( &self, statement: &Statement<'tcx>, state: &mut State<Self::Value>, )

source

fn handle_set_discriminant( &self, place: Place<'tcx>, variant_index: VariantIdx, state: &mut State<Self::Value>, )

source

fn super_set_discriminant( &self, place: Place<'tcx>, _variant_index: VariantIdx, state: &mut State<Self::Value>, )

source

fn handle_intrinsic( &self, intrinsic: &NonDivergingIntrinsic<'tcx>, state: &mut State<Self::Value>, )

source

fn super_intrinsic( &self, intrinsic: &NonDivergingIntrinsic<'tcx>, _state: &mut State<Self::Value>, )

source

fn handle_assign( &self, target: Place<'tcx>, rvalue: &Rvalue<'tcx>, state: &mut State<Self::Value>, )

source

fn super_assign( &self, target: Place<'tcx>, rvalue: &Rvalue<'tcx>, state: &mut State<Self::Value>, )

source

fn handle_rvalue( &self, rvalue: &Rvalue<'tcx>, state: &mut State<Self::Value>, ) -> ValueOrPlace<Self::Value>

source

fn super_rvalue( &self, rvalue: &Rvalue<'tcx>, state: &mut State<Self::Value>, ) -> ValueOrPlace<Self::Value>

source

fn handle_operand( &self, operand: &Operand<'tcx>, state: &mut State<Self::Value>, ) -> ValueOrPlace<Self::Value>

source

fn super_operand( &self, operand: &Operand<'tcx>, state: &mut State<Self::Value>, ) -> ValueOrPlace<Self::Value>

source

fn handle_constant( &self, constant: &ConstOperand<'tcx>, state: &mut State<Self::Value>, ) -> Self::Value

source

fn super_constant( &self, _constant: &ConstOperand<'tcx>, _state: &mut State<Self::Value>, ) -> Self::Value

source

fn handle_terminator<'mir>( &self, terminator: &'mir Terminator<'tcx>, state: &mut State<Self::Value>, ) -> TerminatorEdges<'mir, 'tcx>

The effect of a successful function call return should not be applied here, see Analysis::apply_terminator_effect.

source

fn super_terminator<'mir>( &self, terminator: &'mir Terminator<'tcx>, state: &mut State<Self::Value>, ) -> TerminatorEdges<'mir, 'tcx>

source

fn handle_call_return( &self, return_places: CallReturnPlaces<'_, 'tcx>, state: &mut State<Self::Value>, )

source

fn super_call_return( &self, return_places: CallReturnPlaces<'_, 'tcx>, state: &mut State<Self::Value>, )

source

fn handle_switch_int<'mir>( &self, discr: &'mir Operand<'tcx>, targets: &'mir SwitchTargets, state: &mut State<Self::Value>, ) -> TerminatorEdges<'mir, 'tcx>

source

fn super_switch_int<'mir>( &self, discr: &'mir Operand<'tcx>, targets: &'mir SwitchTargets, _state: &mut State<Self::Value>, ) -> TerminatorEdges<'mir, 'tcx>

source

fn wrap(self) -> ValueAnalysisWrapper<Self>
where Self: Sized,

Object Safety§

This trait is not object safe.

Implementors§