]> git.lizzy.rs Git - rust.git/blob - src/test/ui/packed/packed-struct-size-xc.rs
Rollup merge of #61207 - taiki-e:arbitrary_self_types-lifetime-elision-2, r=Centril
[rust.git] / src / test / ui / packed / packed-struct-size-xc.rs
1 // run-pass
2 // aux-build:packed.rs
3
4
5 extern crate packed;
6
7 use std::mem;
8
9 macro_rules! check {
10     ($t:ty, $align:expr, $size:expr) => ({
11         assert_eq!(mem::align_of::<$t>(), $align);
12         assert_eq!(mem::size_of::<$t>(), $size);
13     });
14 }
15
16 pub fn main() {
17     check!(packed::P1S5, 1, 5);
18     check!(packed::P2S6, 2, 6);
19     check!(packed::P2CS8, 2, 8);
20 }