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