Trait miri::borrow_tracker::tree_borrows::EvalContextPrivExt
source · trait EvalContextPrivExt<'mir: 'ecx, 'tcx: 'mir, 'ecx>: MiriInterpCxExt<'mir, 'tcx> {
// Provided methods
fn tb_reborrow(
&mut self,
place: &MPlaceTy<'tcx, Provenance>,
ptr_size: Size,
new_perm: Option<NewPermission>,
new_tag: BorTag
) -> InterpResult<'tcx, Option<(AllocId, BorTag)>> { ... }
fn tb_retag_reference(
&mut self,
val: &ImmTy<'tcx, Provenance>,
new_perm: Option<NewPermission>
) -> InterpResult<'tcx, ImmTy<'tcx, Provenance>> { ... }
}Provided Methods§
sourcefn tb_reborrow(
&mut self,
place: &MPlaceTy<'tcx, Provenance>,
ptr_size: Size,
new_perm: Option<NewPermission>,
new_tag: BorTag
) -> InterpResult<'tcx, Option<(AllocId, BorTag)>>
fn tb_reborrow( &mut self, place: &MPlaceTy<'tcx, Provenance>, ptr_size: Size, new_perm: Option<NewPermission>, new_tag: BorTag ) -> InterpResult<'tcx, Option<(AllocId, BorTag)>>
Returns the AllocId the reborrow was done in, if there is some actual
memory associated with this pointer. Returns None if there is no actual
memory allocated. Also checks that the reborrow of size ptr_size is
within bounds of the allocation.
Also returns the tag that the pointer should get, which is essentially
if new_perm.is_some() { new_tag } else { parent_tag } along with
some logging (always) and fake reads (if new_perm is
Some(NewPermission { perform_read_access: true }).
sourcefn tb_retag_reference(
&mut self,
val: &ImmTy<'tcx, Provenance>,
new_perm: Option<NewPermission>
) -> InterpResult<'tcx, ImmTy<'tcx, Provenance>>
fn tb_retag_reference( &mut self, val: &ImmTy<'tcx, Provenance>, new_perm: Option<NewPermission> ) -> InterpResult<'tcx, ImmTy<'tcx, Provenance>>
Retags an individual pointer, returning the retagged version.
Implementors§
impl<'mir: 'ecx, 'tcx: 'mir, 'ecx> EvalContextPrivExt<'mir, 'tcx, 'ecx> for MiriInterpCx<'mir, 'tcx>
Retagging/reborrowing. Policy on which permission to grant to each pointer should be left to the implementation of NewPermission.