fork/rust
git clone https://git.julia.blue/fork/rust
5e1a799842b
1.41.0
1warning: skipping const checks 2 --> $DIR/mutable_const.rs:10:38 3 | 4LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _; 5 | ^^^^^^^^^^^^^^^^^^^^ 6 7error: any use of this value will cause an error 8 --> $DIR/mutable_const.rs:16:9 9 | 10LL | / const MUTATING_BEHIND_RAW: () = { 11LL | | // Test that `MUTABLE_BEHIND_RAW` is actually immutable, by doing this at const time. 12LL | | unsafe { 13LL | | *MUTABLE_BEHIND_RAW = 99 14 | | ^^^^^^^^^^^^^^^^^^^^^^^^ tried to modify constant memory 15LL | | } 16LL | | }; 17 | |__- 18 | 19note: lint level defined here 20 --> $DIR/mutable_const.rs:5:9 21 | 22LL | #![deny(const_err)] 23 | ^^^^^^^^^ 24 25error: aborting due to previous error 26