[−][src]Struct rustc_mir::interpret::intern::InternVisitor

pub(in interpret::intern) struct InternVisitor<'rt, 'mir, 'tcx, M: CompileTimeMachine<'mir, 'tcx>> {
    ecx: &'rt mut InterpCx<'mir, 'tcx, M>,
    ref_tracking: &'rt mut RefTracking<(MPlaceTy<'tcx>, InternMode)>,
    leftover_allocations: &'rt mut FxHashSet<AllocId>,
    mode: InternMode,
    inside_unsafe_cell: bool,
}

Fields

ecx: &'rt mut InterpCx<'mir, 'tcx, M>

The ectx from which we intern.

ref_tracking: &'rt mut RefTracking<(MPlaceTy<'tcx>, InternMode)>

Previously encountered safe references.

leftover_allocations: &'rt mut FxHashSet<AllocId>

A list of all encountered allocations. After type-based interning, we traverse this list to also intern allocations that are only referenced by a raw pointer or inside a union.

mode: InternMode

The root kind of the value that we're looking at. This field is never mutated for a particular allocation. It is primarily used to make as many allocations as possible read-only so LLVM can place them in const memory.

inside_unsafe_cell: bool

This field stores whether we are currently inside an UnsafeCell. This can affect the intern mode of references we encounter.

Implementations

impl<'rt, 'mir, 'tcx, M: CompileTimeMachine<'mir, 'tcx>> InternVisitor<'rt, 'mir, 'tcx, M>[src]

pub(in interpret::intern) fn intern_shallow(
    &mut self,
    alloc_id: AllocId,
    mode: InternMode,
    ty: Option<Ty<'tcx>>
) -> Option<IsStaticOrFn>
[src]

Trait Implementations

impl<'rt, 'mir, 'tcx: 'mir, M: CompileTimeMachine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M> for InternVisitor<'rt, 'mir, 'tcx, M>[src]

type V = MPlaceTy<'tcx>

Auto Trait Implementations

impl<'rt, 'mir, 'tcx, M> !RefUnwindSafe for InternVisitor<'rt, 'mir, 'tcx, M>

impl<'rt, 'mir, 'tcx, M> !Send for InternVisitor<'rt, 'mir, 'tcx, M>

impl<'rt, 'mir, 'tcx, M> !Sync for InternVisitor<'rt, 'mir, 'tcx, M>

impl<'rt, 'mir, 'tcx, M> Unpin for InternVisitor<'rt, 'mir, 'tcx, M> where
    'mir: 'rt,
    'tcx: 'rt, 

impl<'rt, 'mir, 'tcx, M> !UnwindSafe for InternVisitor<'rt, 'mir, 'tcx, M>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]