]>
Commit | Line | Data |
---|---|---|
136023e0 | 1 | error[E0080]: evaluation of constant value failed |
3dfed10e XL |
2 | --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL |
3 | | | |
4 | LL | unsafe { intrinsics::offset(self, count) } | |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
6 | | | | |
136023e0 | 7 | | pointer arithmetic failed: alloc3 has size $WORD, so pointer to $TWO_WORDS bytes starting at offset 0 is out-of-bounds |
1b1a35ee | 8 | | inside `ptr::const_ptr::<impl *const usize>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL |
3dfed10e | 9 | | |
136023e0 | 10 | ::: $DIR/ptr_comparisons.rs:61:34 |
3dfed10e XL |
11 | | |
12 | LL | const _: *const usize = unsafe { (FOO as *const usize).offset(2) }; | |
136023e0 | 13 | | ------------------------------- inside `_` at $DIR/ptr_comparisons.rs:61:34 |
3dfed10e | 14 | |
136023e0 | 15 | error[E0080]: evaluation of constant value failed |
17df50a5 | 16 | --> $DIR/ptr_comparisons.rs:64:33 |
3dfed10e | 17 | | |
136023e0 XL |
18 | LL | unsafe { std::ptr::addr_of!((*(FOO as *const usize as *const [u8; 1000]))[999]) }; |
19 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: alloc3 has size $WORD, so pointer to 1000 bytes starting at offset 0 is out-of-bounds | |
3dfed10e XL |
20 | |
21 | error: any use of this value will cause an error | |
17df50a5 | 22 | --> $DIR/ptr_comparisons.rs:68:27 |
3dfed10e XL |
23 | | |
24 | LL | const _: usize = unsafe { std::mem::transmute::<*const usize, usize>(FOO) + 4 }; | |
25 | | --------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--- | |
26 | | | | |
136023e0 | 27 | | unable to turn pointer into raw bytes |
5869c6ff | 28 | | |
136023e0 | 29 | = note: `#[deny(const_err)]` on by default |
5869c6ff XL |
30 | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
31 | = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> | |
3dfed10e XL |
32 | |
33 | error: any use of this value will cause an error | |
17df50a5 | 34 | --> $DIR/ptr_comparisons.rs:73:27 |
3dfed10e XL |
35 | | |
36 | LL | const _: usize = unsafe { *std::mem::transmute::<&&usize, &usize>(&FOO) + 4 }; | |
37 | | --------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--- | |
38 | | | | |
136023e0 | 39 | | unable to turn pointer into raw bytes |
5869c6ff XL |
40 | | |
41 | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | |
42 | = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> | |
3dfed10e XL |
43 | |
44 | error: aborting due to 4 previous errors | |
45 | ||
136023e0 | 46 | For more information about this error, try `rustc --explain E0080`. |