]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-deref-ptr.rs
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / consts / const-deref-ptr.rs
CommitLineData
3c0e092e 1// Check that you can't dereference invalid raw pointers in constants.
223e47cc 2
62682a34 3fn main() {
b7449926 4 static C: u64 = unsafe {*(0xdeadbeef as *const u64)};
3c0e092e 5 //~^ ERROR could not evaluate static initializer
62682a34
SL
6 println!("{}", C);
7}