pub struct ForwardVisitResult<'tcx> {
pub checkpoint: CheckpointLocation,
pub property: Property<'tcx>,
pub path: Path,
pub values: FxHashMap<Local, AbstractValue<'tcx>>,
pub value_definitions: Vec<ValueDefinition<'tcx>>,
pub facts: Vec<StateFact<'tcx>>,
pub forgets: Vec<ForgetReason>,
pub steps: Vec<ForwardStep>,
pub notes: Vec<String>,
}Expand description
Result produced by visiting relevant MIR items forward.
Fields§
§checkpoint: CheckpointLocationUnsafe checkpoint being checked.
property: Property<'tcx>Required property checked at the checkpoint.
path: PathPath whose relevant items were visited.
values: FxHashMap<Local, AbstractValue<'tcx>>Abstract values currently known for MIR locals.
value_definitions: Vec<ValueDefinition<'tcx>>Path-ordered definitions produced while replaying retained MIR items.
facts: Vec<StateFact<'tcx>>Facts recorded during the forward visit.
forgets: Vec<ForgetReason>Places whose facts were conservatively forgotten.
steps: Vec<ForwardStep>Ordered visit trace.
notes: Vec<String>Unsupported items kept as notes rather than modeled facts.
Implementations§
Source§impl<'tcx> ForwardVisitResult<'tcx>
impl<'tcx> ForwardVisitResult<'tcx>
Sourcepub fn new(
checkpoint: CheckpointLocation,
property: Property<'tcx>,
path: Path,
) -> Self
pub fn new( checkpoint: CheckpointLocation, property: Property<'tcx>, path: Path, ) -> Self
Create an empty forward visit result.
Sourcepub fn record_value_definition(
&mut self,
block: BasicBlock,
statement_index: Option<usize>,
local: Local,
value: AbstractValue<'tcx>,
)
pub fn record_value_definition( &mut self, block: BasicBlock, statement_index: Option<usize>, local: Local, value: AbstractValue<'tcx>, )
Record one path-ordered local definition and update the final snapshot.
Sourcefn fold_self_ref(
value: AbstractValue<'tcx>,
local: Local,
snapshot: &FxHashMap<Local, AbstractValue<'tcx>>,
) -> AbstractValue<'tcx>
fn fold_self_ref( value: AbstractValue<'tcx>, local: Local, snapshot: &FxHashMap<Local, AbstractValue<'tcx>>, ) -> AbstractValue<'tcx>
Replace Place(local) inside value with the current snapshot from
values. This prevents self-referencing chains when a local is
re-assigned using its own previous value (e.g. i = i + 1 inside a
loop).
Sourcepub fn latest_value_definition_before(
&self,
local: Local,
cursor: usize,
) -> Option<&ValueDefinition<'tcx>>
pub fn latest_value_definition_before( &self, local: Local, cursor: usize, ) -> Option<&ValueDefinition<'tcx>>
Return the latest definition of local before the exclusive cursor.
Trait Implementations§
Source§impl<'tcx> Clone for ForwardVisitResult<'tcx>
impl<'tcx> Clone for ForwardVisitResult<'tcx>
Source§fn clone(&self) -> ForwardVisitResult<'tcx>
fn clone(&self) -> ForwardVisitResult<'tcx>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'tcx> Freeze for ForwardVisitResult<'tcx>
impl<'tcx> !RefUnwindSafe for ForwardVisitResult<'tcx>
impl<'tcx> Send for ForwardVisitResult<'tcx>
impl<'tcx> Sync for ForwardVisitResult<'tcx>
impl<'tcx> Unpin for ForwardVisitResult<'tcx>
impl<'tcx> !UnwindSafe for ForwardVisitResult<'tcx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more