]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-17458.stderr
Rollup merge of #107023 - scottmcm:stop-shouting, r=Nilstrieb
[rust.git] / tests / ui / consts / issue-17458.stderr
1 error: pointers cannot be cast to integers during const eval
2   --> $DIR/issue-17458.rs:1:28
3    |
4 LL | static X: usize = unsafe { core::ptr::null::<usize>() 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