1 error: this constant cannot be used
2 --> $DIR/const_raw_ptr_ops.rs:16:1
4 LL | const X: bool = &1 as *const i32 == &2 as *const i32; //~ ERROR cannot be used
5 | ^^^^^^^^^^^^^^^^------------------------------------^
7 | "pointer arithmetic or comparison" needs an rfc before being allowed inside constants
9 = note: #[deny(const_err)] on by default
11 error: this constant cannot be used
12 --> $DIR/const_raw_ptr_ops.rs:22:1
14 LL | const Y2: usize = &1 as *const i32 as usize + 1; //~ ERROR cannot be used
15 | ^^^^^^^^^^^^^^^^^^-----------------------------^
17 | "pointer arithmetic or comparison" needs an rfc before being allowed inside constants
19 error: this constant cannot be used
20 --> $DIR/const_raw_ptr_ops.rs:26:1
22 LL | const Z2: i32 = unsafe { *(42 as *const i32) }; //~ ERROR cannot be used
23 | ^^^^^^^^^^^^^^^^^^^^^^^^^-------------------^^^
25 | a memory access tried to interpret some bytes as a pointer
27 error: this constant cannot be used
28 --> $DIR/const_raw_ptr_ops.rs:27:1
30 LL | const Z3: i32 = unsafe { *(44 as *const i32) }; //~ ERROR cannot be used
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^-------------------^^^
33 | a memory access tried to interpret some bytes as a pointer
35 error: aborting due to 4 previous errors