]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/issue-52023-array-size-pointer-cast.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / consts / issue-52023-array-size-pointer-cast.stderr
CommitLineData
136023e0 1error: pointers cannot be cast to integers during const eval.
0731742a 2 --> $DIR/issue-52023-array-size-pointer-cast.rs:2:17
b7449926 3 |
532ac7d7 4LL | let _ = [0; (&0 as *const i32) as usize];
b7449926
XL
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
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 9
fc512014 10error: aborting due to previous error
b7449926 11