]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const-eval/const_raw_ptr_ops2.rs
1 #![feature(const_raw_ptr_deref)]
6 const Z
: i32 = unsafe { *(&1 as *const i32) }
;
8 // bad, will thus error in miri
9 const Z2
: i32 = unsafe { *(42 as *const i32) }
; //~ ERROR evaluation of constant value failed
10 //~| is not a valid pointer
11 const Z3
: i32 = unsafe { *(44 as *const i32) }
; //~ ERROR evaluation of constant value failed
12 //~| is not a valid pointer