• 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 pub type MustUseInt = ::std::os::raw::c_int;
9 extern "C" {
10     #[must_use]
return_int() -> MustUseInt11     pub fn return_int() -> MustUseInt;
12 }
13 #[repr(C)]
14 #[derive(Debug, Copy, Clone)]
15 #[must_use]
16 pub struct MustUseStruct {
17     _unused: [u8; 0],
18 }
19 extern "C" {
20     #[must_use]
return_struct() -> MustUseStruct21     pub fn return_struct() -> MustUseStruct;
22 }
23 /// <div rustbindgen mustusetype></div>
24 pub type AnnotatedInt = ::std::os::raw::c_int;
25 extern "C" {
26     #[must_use]
return_annotated_int() -> AnnotatedInt27     pub fn return_annotated_int() -> AnnotatedInt;
28 }
29 extern "C" {
return_plain_int() -> ::std::os::raw::c_int30     pub fn return_plain_int() -> ::std::os::raw::c_int;
31 }
32 /// <div rustbindgen mustusetype></div>
33 #[repr(C)]
34 #[derive(Debug, Default, Copy, Clone)]
35 #[must_use]
36 pub struct AnnotatedStruct {}
37 #[test]
bindgen_test_layout_AnnotatedStruct()38 fn bindgen_test_layout_AnnotatedStruct() {
39     assert_eq!(
40         ::std::mem::size_of::<AnnotatedStruct>(),
41         0usize,
42         concat!("Size of: ", stringify!(AnnotatedStruct))
43     );
44     assert_eq!(
45         ::std::mem::align_of::<AnnotatedStruct>(),
46         1usize,
47         concat!("Alignment of ", stringify!(AnnotatedStruct))
48     );
49 }
50 extern "C" {
51     #[must_use]
return_annotated_struct() -> AnnotatedStruct52     pub fn return_annotated_struct() -> AnnotatedStruct;
53 }
54 #[repr(C)]
55 #[derive(Debug, Default, Copy, Clone)]
56 pub struct PlainStruct {}
57 #[test]
bindgen_test_layout_PlainStruct()58 fn bindgen_test_layout_PlainStruct() {
59     assert_eq!(
60         ::std::mem::size_of::<PlainStruct>(),
61         0usize,
62         concat!("Size of: ", stringify!(PlainStruct))
63     );
64     assert_eq!(
65         ::std::mem::align_of::<PlainStruct>(),
66         1usize,
67         concat!("Alignment of ", stringify!(PlainStruct))
68     );
69 }
70 /// <div rustbindgen mustusetype></div>
71 pub type TypedefPlainStruct = PlainStruct;
72 extern "C" {
return_plain_struct() -> PlainStruct73     pub fn return_plain_struct() -> PlainStruct;
74 }
75 extern "C" {
76     #[must_use]
return_typedef_struct() -> TypedefPlainStruct77     pub fn return_typedef_struct() -> TypedefPlainStruct;
78 }
79