Function rustc_const_eval::interpret::validity::mutability

source ·
fn mutability<'mir, 'tcx: 'mir>(
    ecx: &InterpCx<'mir, 'tcx, impl Machine<'mir, 'tcx>>,
    alloc_id: AllocId
) -> Mutability
Expand description

Returns whether the allocation is mutable, and whether it’s actually a static. For “root” statics we look at the type to account for interior mutability; for nested statics we have no type and directly use the annotated mutability.