rustc_const_eval::interpret::validity

Function mutability

source
fn mutability<'tcx>(
    ecx: &InterpCx<'tcx, impl Machine<'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.