/// A simple record with mixed field sizes for alignment testing. record Mixed: Copy { a: u8, b: u32, } /// Returns the alignment of a u8. fn alignofU8() -> u32 { return @alignOf(u8); } /// Returns the alignment of a u32. fn alignofU32() -> u32 { return @alignOf(u32); } /// Returns the alignment of a record type. fn alignofRecord() -> u32 { return @alignOf(Mixed); } /// Returns the alignment of an array type. fn alignofArray() -> u32 { return @alignOf([u16; 4]); } /// Returns the alignment of a pointer type. fn alignofPtr() -> u32 { return @alignOf(*u32); } /// Returns the alignment of a slice type. fn alignofSlice() -> u32 { return @alignOf(*[u8]); }