]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / consts / const-mut-refs / mut_ref_in_final_dynamic_check.stderr
1 error: any use of this value will cause an error
2 --> $DIR/mut_ref_in_final_dynamic_check.rs:15:10
3 |
4 LL | Some(&mut *(42 as *mut i32))
5 | ^^^^^^^^^^^^^^^^^^^^^^
6 | |
7 | unable to turn bytes into a pointer
8 | inside `helper` at $DIR/mut_ref_in_final_dynamic_check.rs:15:10
9 | inside `A` at $DIR/mut_ref_in_final_dynamic_check.rs:20:29
10 ...
11 LL | const A: Option<&mut i32> = helper();
12 | -------------------------------------
13 |
14 = note: `#[deny(const_err)]` on by default
15 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
16 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
17
18 error: encountered dangling pointer in final constant
19 --> $DIR/mut_ref_in_final_dynamic_check.rs:27:1
20 |
21 LL | const B: Option<&mut i32> = helper2();
22 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23
24 error: aborting due to 2 previous errors
25