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,
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