remove redundant test
This commit is contained in:
parent
38d03392fa
commit
4e90e3bcf6
1 changed files with 0 additions and 16 deletions
|
|
@ -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 };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue