error: any use of this value will cause an error --> $DIR/mutable_const.rs:18:9 | LL | / const MUTATING_BEHIND_RAW: () = { LL | | // Test that `MUTABLE_BEHIND_RAW` is actually immutable, by doing this at const time. LL | | unsafe { LL | | *MUTABLE_BEHIND_RAW = 99 | | ^^^^^^^^^^^^^^^^^^^^^^^^ writing to allocN which is read-only ... | LL | | } LL | | }; | |__- | note: the lint level is defined here --> $DIR/mutable_const.rs:4:9 | LL | #![deny(const_err)] // The `allow` variant is tested by `mutable_const2`. | ^^^^^^^^^ warning: skipping const checks | help: skipping check that does not even have a feature gate --> $DIR/mutable_const.rs:13:38 | LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _; | ^^^^^^^^^^^^^^^^^^^^ help: skipping check for `const_raw_ptr_deref` feature --> $DIR/mutable_const.rs:18:9 | LL | *MUTABLE_BEHIND_RAW = 99 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: skipping check for `const_mut_refs` feature --> $DIR/mutable_const.rs:18:9 | LL | *MUTABLE_BEHIND_RAW = 99 | ^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error; 1 warning emitted