use std::cell::UnsafeCell; const A: UnsafeCell = UnsafeCell::new(1); const B: &'static UnsafeCell = &A; //~^ ERROR: cannot refer to interior mutable struct C { a: UnsafeCell } const D: C = C { a: UnsafeCell::new(1) }; const E: &'static UnsafeCell = &D.a; //~^ ERROR: cannot refer to interior mutable const F: &'static C = &D; //~^ ERROR: cannot refer to interior mutable fn main() {}