]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/packed/packed-struct-borrow-element-64bit.rs
Rollup merge of #107576 - P1n3appl3:master, r=tmandry
[rust.git] / tests / ui / packed / packed-struct-borrow-element-64bit.rs
index 00bddfe40b25b7ae3a4e6a00e473f0608cb308cc..63315ea66737ae09043851c2669eede600d9dba0 100644 (file)
@@ -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);
 }