• 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 #[repr(C)]
9 #[derive(Debug, Default, Copy, Clone)]
10 pub struct Struct {
11     pub _address: u8,
12 }
13 #[test]
bindgen_test_layout_Struct()14 fn bindgen_test_layout_Struct() {
15     assert_eq!(
16         ::std::mem::size_of::<Struct>(),
17         1usize,
18         concat!("Size of: ", stringify!(Struct))
19     );
20     assert_eq!(
21         ::std::mem::align_of::<Struct>(),
22         1usize,
23         concat!("Alignment of ", stringify!(Struct))
24     );
25 }
26 extern "C" {
27     #[link_name = "\u{1}_ZN6Struct8FunctionER5Union"]
Struct_Function(this: *mut Struct, arg1: *mut Union)28     pub fn Struct_Function(this: *mut Struct, arg1: *mut Union);
29 }
30 impl Struct {
31     #[inline]
Function(&mut self, arg1: *mut Union)32     pub unsafe fn Function(&mut self, arg1: *mut Union) {
33         Struct_Function(self, arg1)
34     }
35 }
36 #[repr(C)]
37 #[derive(Copy, Clone)]
38 pub struct Union {
39     _unused: [u8; 0],
40 }
41