13 // Raise alignment by maximum
14 #[repr(align(1), align(16))]
22 // Not reducing alignment
25 Foo { limb_with_align16: Align16 },
29 // No niche for discriminant when used as limb
31 struct NoNiche16(u64, u64);
33 // Discriminant will require extra space, but enum needs to stay compatible
37 Foo { limb_with_noniche16: NoNiche16 },
43 assert_eq!(mem::align_of::<Align16>(), 16);
44 assert_eq!(mem::size_of::<Align16>(), 16);
46 assert_eq!(mem::align_of::<Align32>(), 32);
47 assert_eq!(mem::size_of::<Align32>(), 32);
49 assert_eq!(mem::align_of::<AlsoAlign16>(), 16);
50 assert_eq!(mem::size_of::<AlsoAlign16>(), 16);
52 assert_eq!(mem::align_of::<AnotherAlign16>(), 16);
53 assert_eq!(mem::size_of::<AnotherAlign16>(), 32);