1 #![allow(
2 dead_code,
3 non_snake_case,
4 non_camel_case_types,
5 non_upper_case_globals
6 )]
7
8 #[repr(C)]
9 #[derive(Debug, Default, Copy, Clone)]
10 pub struct a {
11 pub _address: u8,
12 }
13 #[repr(C)]
14 #[derive(Debug, Default, Copy, Clone)]
15 pub struct _bindgen_ty_1 {
16 pub ar: a,
17 }
18 #[test]
bindgen_test_layout__bindgen_ty_1null19 fn bindgen_test_layout__bindgen_ty_1() {
20 const UNINIT: ::std::mem::MaybeUninit<_bindgen_ty_1> =
21 ::std::mem::MaybeUninit::uninit();
22 let ptr = UNINIT.as_ptr();
23 assert_eq!(
24 ::std::mem::size_of::<_bindgen_ty_1>(),
25 1usize,
26 concat!("Size of: ", stringify!(_bindgen_ty_1))
27 );
28 assert_eq!(
29 ::std::mem::align_of::<_bindgen_ty_1>(),
30 1usize,
31 concat!("Alignment of ", stringify!(_bindgen_ty_1))
32 );
33 assert_eq!(
34 unsafe { ::std::ptr::addr_of!((*ptr).ar) as usize - ptr as usize },
35 0usize,
36 concat!(
37 "Offset of field: ",
38 stringify!(_bindgen_ty_1),
39 "::",
40 stringify!(ar)
41 )
42 );
43 }
44 extern "C" {
45 pub static mut AutoIdVector: _bindgen_ty_1;
46 }
47 #[test]
__bindgen_test_layout_a_open0_int_close0_instantiationnull48 fn __bindgen_test_layout_a_open0_int_close0_instantiation() {
49 assert_eq!(
50 ::std::mem::size_of::<a>(),
51 1usize,
52 concat!("Size of template specialization: ", stringify!(a))
53 );
54 assert_eq!(
55 ::std::mem::align_of::<a>(),
56 1usize,
57 concat!("Alignment of template specialization: ", stringify!(a))
58 );
59 }
60