diff options
Diffstat (limited to 'tests/ui/packed/packed-struct-borrow-element-64bit.rs')
-rw-r--r-- | tests/ui/packed/packed-struct-borrow-element-64bit.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/ui/packed/packed-struct-borrow-element-64bit.rs b/tests/ui/packed/packed-struct-borrow-element-64bit.rs index 00bddfe40..63315ea66 100644 --- a/tests/ui/packed/packed-struct-borrow-element-64bit.rs +++ b/tests/ui/packed/packed-struct-borrow-element-64bit.rs @@ -1,4 +1,3 @@ -// run-pass (note: this is spec-UB, but it works for now) // ignore-32bit (needs `usize` to be 8-aligned to reproduce all the errors below) #![allow(dead_code)] // ignore-emscripten weird assertion? @@ -9,10 +8,8 @@ struct Foo4C { baz: usize } -#[warn(unaligned_references)] pub fn main() { let foo = Foo4C { bar: 1, baz: 2 }; - let brw = &foo.baz; //~WARN reference to packed field is unaligned - //~^ previously accepted + let brw = &foo.baz; //~ERROR reference to packed field is unaligned assert_eq!(*brw, 2); } |