]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/miri_unleashed/raw_mutable_const.stderr
Rollup merge of #98640 - cuviper:stable-rust-analyzer, r=Mark-Simulacrum
[rust.git] / src / test / ui / consts / miri_unleashed / raw_mutable_const.stderr
1 error: untyped pointers are not allowed in constant
2   --> $DIR/raw_mutable_const.rs:7:1
3    |
4 LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
7 warning: skipping const checks
8    |
9 help: skipping check that does not even have a feature gate
10   --> $DIR/raw_mutable_const.rs:7:38
11    |
12 LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
13    |                                      ^^^^^^^^^^^^^^^^^^^^
14
15 error: aborting due to previous error; 1 warning emitted
16