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