fn intern_shallow<'tcx, T, M: CompileTimeMachine<'tcx, T>>(
ecx: &mut InterpCx<'tcx, M>,
alloc_id: AllocId,
mutability: Mutability,
) -> Result<impl Iterator<Item = CtfeProvenance> + 'tcx, ()>
Expand description
Intern an allocation. Returns Err
if the allocation does not exist in the local memory.
mutability
can be used to force immutable interning: if it is Mutability::Not
, the
allocation is interned immutably; if it is Mutability::Mut
, then the allocation must be
already mutable (as a sanity check).
Returns an iterator over all relocations referred to by this allocation.