]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr
Auto merge of #85357 - Andy-Python-Programmer:aarch64_uefi_target, r=petrochenkov
[rust.git] / src / test / ui / consts / const-mut-refs / mut_ref_in_final_dynamic_check.stderr
1 error[E0080]: evaluation of constant value failed
2   --> $DIR/mut_ref_in_final_dynamic_check.rs:14:10
3    |
4 LL |     Some(&mut *(42 as *mut i32))
5    |          ^^^^^^^^^^^^^^^^^^^^^^
6    |          |
7    |          0x2a is not a valid pointer
8    |          inside `helper` at $DIR/mut_ref_in_final_dynamic_check.rs:14:10
9 ...
10 LL | const A: Option<&mut i32> = helper();
11    |                             -------- inside `A` at $DIR/mut_ref_in_final_dynamic_check.rs:19:29
12
13 error: encountered dangling pointer in final constant
14   --> $DIR/mut_ref_in_final_dynamic_check.rs:26:1
15    |
16 LL | const B: Option<&mut i32> = helper2();
17    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0080`.