error[E0080]: evaluation of constant value failed --> $DIR/mut_ref_in_final_dynamic_check.rs:13:10 | LL | Some(&mut *(42 as *mut i32)) | ^^^^^^^^^^^^^^^^^^^^^^ | | | dereferencing pointer failed: 0x2a[noalloc] is a dangling pointer (it has no provenance) | inside `helper` at $DIR/mut_ref_in_final_dynamic_check.rs:13:10 ... LL | const A: Option<&mut i32> = helper(); | -------- inside `A` at $DIR/mut_ref_in_final_dynamic_check.rs:18:29 error: encountered dangling pointer in final constant --> $DIR/mut_ref_in_final_dynamic_check.rs:25:1 | LL | const B: Option<&mut i32> = helper2(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0080`.