]>
Commit | Line | Data |
---|---|---|
c295e0f8 | 1 | error: pointers cannot be cast to integers during const eval |
9fa01778 | 2 | --> $DIR/issue-17458.rs:1:28 |
b7449926 | 3 | | |
dc9dc135 XL |
4 | LL | static X: usize = unsafe { core::ptr::null::<usize>() as usize }; |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
b7449926 | 6 | | |
136023e0 XL |
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 | |
b7449926 XL |
9 | |
10 | error: aborting due to previous error | |
11 |