pub(crate) struct Checkpoint<'tcx> {
pub(super) caller: DefId,
pub(super) callee: Option<DefId>,
pub(super) args: Vec<Operand<'tcx>>,
pub(super) destination: Option<Local>,
pub(super) block: BasicBlock,
pub(super) stmt_index: usize,
pub(super) kind: CheckpointKind,
pub(super) requires: Vec<Property<'tcx>>,
pub(super) is_mut_ref: bool,
}Expand description
A point in a function’s MIR whose safety requirements are checked.
Most checkpoints are unsafe function calls. Calls lowered to MIR intrinsics,
raw-pointer dereferences, and static mut accesses use the same representation
and follow the same path extraction and verification pipeline.
§Agent Rules
Do not add new fields to this struct.
Fields§
§caller: DefId§callee: Option<DefId>§args: Vec<Operand<'tcx>>§destination: Option<Local>Local produced by this operation, if any.
block: BasicBlock§stmt_index: usizePosition of this checkpoint within the MIR block.
kind: CheckpointKind§requires: Vec<Property<'tcx>>Requirements attached directly to this MIR operation.
is_mut_ref: boolFor RawPtrDeref checkpoints: whether the deref produces a mutable
reference (&mut *ptr) rather than a shared one (&*ptr).
Implementations§
Source§impl<'tcx> Checkpoint<'tcx>
impl<'tcx> Checkpoint<'tcx>
Sourcepub fn location(&self) -> CheckpointLocation
pub fn location(&self) -> CheckpointLocation
Return the MIR location that identifies this checkpoint inside the verifier.
Sourcepub fn callee_name(&self, tcx: TyCtxt<'tcx>) -> String
pub fn callee_name(&self, tcx: TyCtxt<'tcx>) -> String
Return a human-readable label for diagnostics.
Trait Implementations§
Source§impl<'tcx> Clone for Checkpoint<'tcx>
impl<'tcx> Clone for Checkpoint<'tcx>
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for Checkpoint<'tcx>
impl<'tcx> !UnwindSafe for Checkpoint<'tcx>
impl<'tcx> DynSend for Checkpoint<'tcx>
impl<'tcx> DynSync for Checkpoint<'tcx>
impl<'tcx> Forget for Checkpoint<'tcx>
impl<'tcx> Freeze for Checkpoint<'tcx>
impl<'tcx> Move for Checkpoint<'tcx>
impl<'tcx> Send for Checkpoint<'tcx>
impl<'tcx> Sync for Checkpoint<'tcx>
impl<'tcx> Unpin for Checkpoint<'tcx>
impl<'tcx> UnsafeUnpin for Checkpoint<'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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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