Function rustc_const_eval::interpret::intern::intern_shallow
source ยท fn intern_shallow<'rt, 'tcx, T, M: CompileTimeMachine<'tcx, T>>(
ecx: &'rt 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.