Trait miri::stacked_borrows::EvalContextPrivExt
source · [−]trait EvalContextPrivExt<'mir: 'ecx, 'tcx: 'mir, 'ecx>: MiriEvalContextExt<'mir, 'tcx> {
fn reborrow(
&mut self,
place: &MPlaceTy<'tcx, Provenance>,
size: Size,
kind: RefKind,
retag_cause: RetagCause,
new_tag: SbTag,
protect: bool
) -> InterpResult<'tcx, Option<AllocId>> { ... }
fn retag_reference(
&mut self,
val: &ImmTy<'tcx, Provenance>,
kind: RefKind,
retag_cause: RetagCause,
protect: bool
) -> InterpResult<'tcx, ImmTy<'tcx, Provenance>> { ... }
}
Provided Methods
sourcefn reborrow(
&mut self,
place: &MPlaceTy<'tcx, Provenance>,
size: Size,
kind: RefKind,
retag_cause: RetagCause,
new_tag: SbTag,
protect: bool
) -> InterpResult<'tcx, Option<AllocId>>
fn reborrow(
&mut self,
place: &MPlaceTy<'tcx, Provenance>,
size: Size,
kind: RefKind,
retag_cause: RetagCause,
new_tag: SbTag,
protect: bool
) -> InterpResult<'tcx, Option<AllocId>>
Returns the AllocId
the reborrow was done in, if some actual borrow stack manipulation
happened.
sourcefn retag_reference(
&mut self,
val: &ImmTy<'tcx, Provenance>,
kind: RefKind,
retag_cause: RetagCause,
protect: bool
) -> InterpResult<'tcx, ImmTy<'tcx, Provenance>>
fn retag_reference(
&mut self,
val: &ImmTy<'tcx, Provenance>,
kind: RefKind,
retag_cause: RetagCause,
protect: bool
) -> InterpResult<'tcx, ImmTy<'tcx, Provenance>>
Retags an indidual pointer, returning the retagged version.
mutbl
can be None
to make this a raw pointer.
Implementors
impl<'mir: 'ecx, 'tcx: 'mir, 'ecx> EvalContextPrivExt<'mir, 'tcx, 'ecx> for MiriEvalContext<'mir, 'tcx>
Retagging/reborrowing. There is some policy in here, such as which permissions to grant for which references, and when to add protectors.