Merge pull request #273 from RalfJung/ref

Test that &* of a dangling (and even unaligned) ptr is okay
This commit is contained in:
Oliver Schneider 2017-07-26 07:46:39 +02:00 committed by GitHub
commit 46324c24ca

View file

@ -0,0 +1,7 @@
fn main() {
let x = 2usize as *const u32;
let _y = unsafe { &*x as *const u32 };
let x = 0usize as *const u32;
let _y = unsafe { &*x as *const u32 };
}