rust/tests/run-pass/packed_static.rs
2017-08-08 17:09:26 +02:00

11 lines
120 B
Rust

#[repr(packed)]
struct Foo {
i: i32
}
fn main() {
assert_eq!({FOO.i}, 42);
}
static FOO: Foo = Foo { i: 42 };