fn intern_shallow<'rt, 'mir, 'tcx, M: CompileTimeMachine<'mir, 'tcx, MemoryKind>>(
    ecx: &'rt mut InterpCx<'mir, 'tcx, M>,
    leftover_allocations: &'rt mut FxHashSet<AllocId>,
    alloc_id: AllocId,
    mode: InternMode,
    ty: Option<Ty<'tcx>>
) -> Option<IsStaticOrFn>
Expand description

Intern an allocation without looking at its children. mode is the mode of the environment where we found this pointer. mutability is the mutability of the place to be interned; even if that says immutable things might become mutable if ty is not frozen. ty can be None if there is no potential interior mutability to account for (e.g. for vtables).