3 #![allow(overflowing_literals)]
17 let s
= S { a: 0xff_ff_ff_ffu32, b: 1, c: 0xaa_aa_aa_aa as i32 }
;
18 let transd
: [u8; 9] = mem
::transmute(s
);
19 // Don't worry about endianness, the numbers are palindromic.
21 [0xff, 0xff, 0xff, 0xff,
23 0xaa, 0xaa, 0xaa, 0xaa]);
26 let s
= S { a: 1u8, b: 2u8, c: 0b10000001_10000001 as i16}
;
27 let transd
: [u8; 4] = mem
::transmute(s
);
28 // Again, no endianness problems.
30 [1, 2, 0b10000001, 0b10000001]);