]> git.proxmox.com Git - rustc.git/blob - src/test/run-pass/packed/auxiliary/packed.rs
828be41cd41576ce2fcdbf42506de2bda9974d85
[rustc.git] / src / test / run-pass / packed / auxiliary / packed.rs
1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 #![feature(repr_packed)]
12
13 #[repr(packed)]
14 pub struct P1S5 {
15 a: u8,
16 b: u32
17 }
18
19 #[repr(packed(2))]
20 pub struct P2S6 {
21 a: u8,
22 b: u32,
23 c: u8
24 }
25
26 #[repr(C, packed(2))]
27 pub struct P2CS8 {
28 a: u8,
29 b: u32,
30 c: u8
31 }