Struct miri::helpers::CurrentSpan
source · [−]Expand description
A CurrentSpan should be created infrequently (ideally once) per interpreter step. It does
nothing on creation, but when CurrentSpan::get is called, searches the current stack for the
topmost frame which corresponds to a local crate, and returns the current span in that frame.
The result of that search is cached so that later calls are approximately free.
Fields
span: Option<Span>machine: &'a Evaluator<'mir, 'tcx>Implementations
sourceimpl<'a, 'mir, 'tcx> CurrentSpan<'a, 'mir, 'tcx>
impl<'a, 'mir, 'tcx> CurrentSpan<'a, 'mir, 'tcx>
Trait Implementations
sourceimpl<'a, 'mir, 'tcx> Clone for CurrentSpan<'a, 'mir, 'tcx>
impl<'a, 'mir, 'tcx> Clone for CurrentSpan<'a, 'mir, 'tcx>
sourcefn clone(&self) -> CurrentSpan<'a, 'mir, 'tcx>
fn clone(&self) -> CurrentSpan<'a, 'mir, 'tcx>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl<'a, 'mir, 'tcx> !RefUnwindSafe for CurrentSpan<'a, 'mir, 'tcx>
impl<'a, 'mir, 'tcx> !Send for CurrentSpan<'a, 'mir, 'tcx>
impl<'a, 'mir, 'tcx> !Sync for CurrentSpan<'a, 'mir, 'tcx>
impl<'a, 'mir, 'tcx> Unpin for CurrentSpan<'a, 'mir, 'tcx> where
'mir: 'a,
'tcx: 'a,
impl<'a, 'mir, 'tcx> !UnwindSafe for CurrentSpan<'a, 'mir, 'tcx>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
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: 24 bytes