Trait miri::borrow_tracker::stacked_borrows::EvalContextExt
source · pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
fn sb_retag_ptr_value(
&mut self,
kind: RetagKind,
val: &ImmTy<'tcx, Provenance>
) -> InterpResult<'tcx, ImmTy<'tcx, Provenance>> { ... }
fn sb_retag_place_contents(
&mut self,
kind: RetagKind,
place: &PlaceTy<'tcx, Provenance>
) -> InterpResult<'tcx> { ... }
fn sb_retag_return_place(&mut self) -> InterpResult<'tcx> { ... }
fn sb_expose_tag(
&mut self,
alloc_id: AllocId,
tag: BorTag
) -> InterpResult<'tcx> { ... }
fn print_stacks(&mut self, alloc_id: AllocId) -> InterpResult<'tcx> { ... }
}
Provided Methods§
fn sb_retag_ptr_value(
&mut self,
kind: RetagKind,
val: &ImmTy<'tcx, Provenance>
) -> InterpResult<'tcx, ImmTy<'tcx, Provenance>>
fn sb_retag_place_contents(
&mut self,
kind: RetagKind,
place: &PlaceTy<'tcx, Provenance>
) -> InterpResult<'tcx>
sourcefn sb_retag_return_place(&mut self) -> InterpResult<'tcx>
fn sb_retag_return_place(&mut self) -> InterpResult<'tcx>
After a stack frame got pushed, retag the return place so that we are sure it does not alias with anything.
This is a HACK because there is nothing in MIR that would make the retag explicit. Also see https://github.com/rust-lang/rust/issues/71117.
sourcefn sb_expose_tag(&mut self, alloc_id: AllocId, tag: BorTag) -> InterpResult<'tcx>
fn sb_expose_tag(&mut self, alloc_id: AllocId, tag: BorTag) -> InterpResult<'tcx>
Mark the given tag as exposed. It was found on a pointer with the given AllocId.