commit
2cdd1744b8
2 changed files with 3 additions and 3 deletions
|
|
@ -1 +1 @@
|
|||
372afcf93bf60e1a9334b107cc3d72f1b0a4b1f4
|
||||
9b0edb7fddacd6a60a380c1ce59159de597ab270
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// This should fail even without validation/SB
|
||||
// compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows
|
||||
|
||||
#![allow(dead_code, unused_variables)]
|
||||
#![allow(dead_code, unused_variables, unaligned_references)]
|
||||
|
||||
#[repr(packed)]
|
||||
struct Foo {
|
||||
|
|
@ -15,7 +15,7 @@ fn main() {
|
|||
x: 42,
|
||||
y: 99,
|
||||
};
|
||||
let p = unsafe { &foo.x };
|
||||
let p = &foo.x;
|
||||
let i = *p; //~ERROR alignment 4 is required
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue