diff --git a/tests/compile-fail/reference_to_packed_unsafe.rs b/tests/compile-fail/reference_to_packed_unsafe.rs deleted file mode 100644 index b5893cd10197..000000000000 --- a/tests/compile-fail/reference_to_packed_unsafe.rs +++ /dev/null @@ -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 }; -}