]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-18294.stderr
Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstrieb
[rust.git] / tests / ui / consts / issue-18294.stderr
1 error: pointers cannot be cast to integers during const eval
2   --> $DIR/issue-18294.rs:3:31
3    |
4 LL |     const Y: usize = unsafe { &X as *const u32 as usize };
5    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: at compile-time, pointers do not have an integer value
8    = note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior
9
10 error: aborting due to previous error
11