remove redundant test

This commit is contained in:
Ralf Jung 2017-06-23 14:13:06 -07:00
parent 38d03392fa
commit 4e90e3bcf6

View file

@ -1,16 +0,0 @@
#![allow(dead_code, unused_variables)]
#[repr(packed)]
struct Foo {
x: i32,
y: i32,
}
fn main() {
let foo = Foo {
x: 42,
y: 99,
};
let p: *const i32 = &foo.x; //~ ERROR tried to access memory with alignment 1, but alignment 4 is required
let x = unsafe { *p + foo.x };
}