]> git.proxmox.com Git - rustc.git/blob - tests/ui/consts/miri_unleashed/ptr_arith.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / consts / miri_unleashed / ptr_arith.stderr
1 error[E0080]: could not evaluate static initializer
2 --> $DIR/ptr_arith.rs:8:13
3 |
4 LL | let x = &0 as *const _ as usize;
5 | ^^^^^^^^^^^^^^^^^^^^^^^ exposing pointers is not possible at compile-time
6
7 error[E0080]: could not evaluate static initializer
8 --> $DIR/ptr_arith.rs:16:14
9 |
10 LL | let _v = x + 0;
11 | ^ unable to turn pointer into raw bytes
12 |
13 = help: this code performed an operation that depends on the underlying bytes representing a pointer
14 = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
15
16 warning: skipping const checks
17 |
18 help: skipping check that does not even have a feature gate
19 --> $DIR/ptr_arith.rs:8:13
20 |
21 LL | let x = &0 as *const _ as usize;
22 | ^^^^^^^^^^^^^^^^^^^^^^^
23
24 error: aborting due to 2 previous errors; 1 warning emitted
25
26 For more information about this error, try `rustc --explain E0080`.