Enum miri::borrow_tracker::AllocState
source · pub enum AllocState {
StackedBorrows(Box<RefCell<Stacks>>),
TreeBorrows(Box<RefCell<Tree>>),
}
Expand description
Extra per-allocation data for borrow tracking
Variants§
StackedBorrows(Box<RefCell<Stacks>>)
Data corresponding to Stacked Borrows
TreeBorrows(Box<RefCell<Tree>>)
Data corresponding to Tree Borrows
Implementations§
source§impl AllocState
impl AllocState
pub fn before_memory_read<'tcx>( &self, alloc_id: AllocId, prov_extra: ProvenanceExtra, range: AllocRange, machine: &MiriMachine<'tcx>, ) -> InterpResult<'tcx>
pub fn before_memory_write<'tcx>( &mut self, alloc_id: AllocId, prov_extra: ProvenanceExtra, range: AllocRange, machine: &MiriMachine<'tcx>, ) -> InterpResult<'tcx>
pub fn before_memory_deallocation<'tcx>( &mut self, alloc_id: AllocId, prov_extra: ProvenanceExtra, size: Size, machine: &MiriMachine<'tcx>, ) -> InterpResult<'tcx>
sourcepub fn release_protector<'tcx>(
&self,
machine: &MiriMachine<'tcx>,
global: &RefCell<GlobalStateInner>,
tag: BorTag,
alloc_id: AllocId,
) -> InterpResult<'tcx>
pub fn release_protector<'tcx>( &self, machine: &MiriMachine<'tcx>, global: &RefCell<GlobalStateInner>, tag: BorTag, alloc_id: AllocId, ) -> InterpResult<'tcx>
Tree Borrows needs to be told when a tag stops being protected.
Trait Implementations§
source§impl Clone for AllocState
impl Clone for AllocState
source§fn clone(&self) -> AllocState
fn clone(&self) -> AllocState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AllocState
impl Debug for AllocState
source§impl VisitProvenance for AllocState
impl VisitProvenance for AllocState
fn visit_provenance(&self, visit: &mut VisitWith<'_>)
Auto Trait Implementations§
impl Freeze for AllocState
impl !RefUnwindSafe for AllocState
impl !Send for AllocState
impl !Sync for AllocState
impl Unpin for AllocState
impl UnwindSafe for AllocState
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes
Size for each variant:
StackedBorrows
: 8 bytesTreeBorrows
: 8 bytes