2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-03-09 23:56:40 -06:00
|
|
|
use std::mem;
|
|
|
|
|
|
|
|
#[r#repr(r#C, r#packed)]
|
|
|
|
struct Test {
|
|
|
|
a: bool, b: u64
|
|
|
|
}
|
|
|
|
|
|
|
|
#[r#derive(r#Debug)]
|
2022-07-25 15:36:03 -05:00
|
|
|
struct Test2(#[allow(unused_tuple_struct_fields)] u32);
|
2018-03-09 23:56:40 -06:00
|
|
|
|
|
|
|
pub fn main() {
|
|
|
|
assert_eq!(mem::size_of::<Test>(), 9);
|
|
|
|
assert_eq!("Test2(123)", format!("{:?}", Test2(123)));
|
|
|
|
}
|