]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/const_raw_ptr_ops2.stderr
Rollup merge of #83634 - JohnTitor:proc-macro-ice, r=varkor
[rust.git] / src / test / ui / consts / const-eval / const_raw_ptr_ops2.stderr
1 error: any use of this value will cause an error
2   --> $DIR/const_raw_ptr_ops2.rs:8:28
3    |
4 LL | const Y2: usize = unsafe { &1 as *const i32 as usize + 1 };
5    | ---------------------------^^^^^^^^^^^^^^^^^^^^^^^^^-------
6    |                            |
7    |                            cannot cast pointer to integer because it was not created by cast from integer
8    |
9    = note: `#[deny(const_err)]` on by default
10    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
11    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
12
13 error: any use of this value will cause an error
14   --> $DIR/const_raw_ptr_ops2.rs:13:26
15    |
16 LL | const Z2: i32 = unsafe { *(42 as *const i32) };
17    | -------------------------^^^^^^^^^^^^^^^^^^^---
18    |                          |
19    |                          unable to turn bytes into a pointer
20    |
21    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
22    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
23
24 error: any use of this value will cause an error
25   --> $DIR/const_raw_ptr_ops2.rs:15:26
26    |
27 LL | const Z3: i32 = unsafe { *(44 as *const i32) };
28    | -------------------------^^^^^^^^^^^^^^^^^^^---
29    |                          |
30    |                          unable to turn bytes into a pointer
31    |
32    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
33    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
34
35 error: aborting due to 3 previous errors
36