mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 14:10:03 +03:00
remove redundant test
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
Reference in New Issue
Block a user