• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #![allow(
2     dead_code,
3     non_snake_case,
4     non_camel_case_types,
5     non_upper_case_globals
6 )]
7 
8 extern "C" {
9     #[link_name = "\u{1}_Z3fooP9Container"]
foo(c: *mut Container)10     pub fn foo(c: *mut Container);
11 }
12 #[repr(C)]
13 #[repr(align(4))]
14 #[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
15 pub struct Container {
16     pub _bindgen_opaque_blob: [u32; 2usize],
17 }
18 #[test]
bindgen_test_layout_Container()19 fn bindgen_test_layout_Container() {
20     assert_eq!(
21         ::std::mem::size_of::<Container>(),
22         8usize,
23         concat!("Size of: ", stringify!(Container))
24     );
25     assert_eq!(
26         ::std::mem::align_of::<Container>(),
27         4usize,
28         concat!("Alignment of ", stringify!(Container))
29     );
30 }
31