summaryrefslogtreecommitdiff
path: root/tests/expectations/tests/issue-1076-unnamed-bitfield-alignment.rs
blob: 00b3f11ba84b35a46ec9f41b18cdf6e2af0eff51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* automatically generated by rust-bindgen */


#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]


#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct S1 {
    pub _bitfield_1: [u8; 2usize],
    pub __bindgen_padding_0: u8,
}
#[test]
fn bindgen_test_layout_S1() {
    assert_eq!(
        ::std::mem::size_of::<S1>(),
        3usize,
        concat!("Size of: ", stringify!(S1))
    );
    assert_eq!(
        ::std::mem::align_of::<S1>(),
        1usize,
        concat!("Alignment of ", stringify!(S1))
    );
}
impl S1 {
    #[inline]
    pub fn new_bitfield_1() -> u16 {
        0
    }
}