1 #![allow(
2 dead_code,
3 non_snake_case,
4 non_camel_case_types,
5 non_upper_case_globals
6 )]
7
8 impl Foo {
9 pub const Bar: Foo = Foo(2);
10 }
11 impl Foo {
12 pub const Baz: Foo = Foo(4);
13 }
14 impl Foo {
15 pub const Duplicated: Foo = Foo(4);
16 }
17 impl Foo {
18 pub const Negative: Foo = Foo(-3);
19 }
20 impl ::std::ops::BitOr<Foo> for Foo {
21 type Output = Self;
22 #[inline]
bitor(self, other: Self) -> Self23 fn bitor(self, other: Self) -> Self {
24 Foo(self.0 | other.0)
25 }
26 }
27 impl ::std::ops::BitOrAssign for Foo {
28 #[inline]
bitor_assign(&mut self, rhs: Foo)29 fn bitor_assign(&mut self, rhs: Foo) {
30 self.0 |= rhs.0;
31 }
32 }
33 impl ::std::ops::BitAnd<Foo> for Foo {
34 type Output = Self;
35 #[inline]
bitand(self, other: Self) -> Self36 fn bitand(self, other: Self) -> Self {
37 Foo(self.0 & other.0)
38 }
39 }
40 impl ::std::ops::BitAndAssign for Foo {
41 #[inline]
bitand_assign(&mut self, rhs: Foo)42 fn bitand_assign(&mut self, rhs: Foo) {
43 self.0 &= rhs.0;
44 }
45 }
46 #[repr(transparent)]
47 #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
48 pub struct Foo(pub ::std::os::raw::c_int);
49 impl Buz {
50 pub const Bar: Buz = Buz(2);
51 }
52 impl Buz {
53 pub const Baz: Buz = Buz(4);
54 }
55 impl Buz {
56 pub const Duplicated: Buz = Buz(4);
57 }
58 impl Buz {
59 pub const Negative: Buz = Buz(-3);
60 }
61 impl ::std::ops::BitOr<Buz> for Buz {
62 type Output = Self;
63 #[inline]
bitor(self, other: Self) -> Self64 fn bitor(self, other: Self) -> Self {
65 Buz(self.0 | other.0)
66 }
67 }
68 impl ::std::ops::BitOrAssign for Buz {
69 #[inline]
bitor_assign(&mut self, rhs: Buz)70 fn bitor_assign(&mut self, rhs: Buz) {
71 self.0 |= rhs.0;
72 }
73 }
74 impl ::std::ops::BitAnd<Buz> for Buz {
75 type Output = Self;
76 #[inline]
bitand(self, other: Self) -> Self77 fn bitand(self, other: Self) -> Self {
78 Buz(self.0 & other.0)
79 }
80 }
81 impl ::std::ops::BitAndAssign for Buz {
82 #[inline]
bitand_assign(&mut self, rhs: Buz)83 fn bitand_assign(&mut self, rhs: Buz) {
84 self.0 &= rhs.0;
85 }
86 }
87 #[repr(transparent)]
88 #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
89 pub struct Buz(pub ::std::os::raw::c_schar);
90 pub const NS_FOO: _bindgen_ty_1 = _bindgen_ty_1(1);
91 pub const NS_BAR: _bindgen_ty_1 = _bindgen_ty_1(2);
92 impl ::std::ops::BitOr<_bindgen_ty_1> for _bindgen_ty_1 {
93 type Output = Self;
94 #[inline]
bitor(self, other: Self) -> Self95 fn bitor(self, other: Self) -> Self {
96 _bindgen_ty_1(self.0 | other.0)
97 }
98 }
99 impl ::std::ops::BitOrAssign for _bindgen_ty_1 {
100 #[inline]
bitor_assign(&mut self, rhs: _bindgen_ty_1)101 fn bitor_assign(&mut self, rhs: _bindgen_ty_1) {
102 self.0 |= rhs.0;
103 }
104 }
105 impl ::std::ops::BitAnd<_bindgen_ty_1> for _bindgen_ty_1 {
106 type Output = Self;
107 #[inline]
bitand(self, other: Self) -> Self108 fn bitand(self, other: Self) -> Self {
109 _bindgen_ty_1(self.0 & other.0)
110 }
111 }
112 impl ::std::ops::BitAndAssign for _bindgen_ty_1 {
113 #[inline]
bitand_assign(&mut self, rhs: _bindgen_ty_1)114 fn bitand_assign(&mut self, rhs: _bindgen_ty_1) {
115 self.0 &= rhs.0;
116 }
117 }
118 #[repr(transparent)]
119 #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
120 pub struct _bindgen_ty_1(pub ::std::os::raw::c_uint);
121 #[repr(C)]
122 #[derive(Debug, Default, Copy, Clone)]
123 pub struct Dummy {
124 pub _address: u8,
125 }
126 pub const Dummy_DUMMY_FOO: Dummy__bindgen_ty_1 = Dummy__bindgen_ty_1(1);
127 pub const Dummy_DUMMY_BAR: Dummy__bindgen_ty_1 = Dummy__bindgen_ty_1(2);
128 impl ::std::ops::BitOr<Dummy__bindgen_ty_1> for Dummy__bindgen_ty_1 {
129 type Output = Self;
130 #[inline]
bitor(self, other: Self) -> Self131 fn bitor(self, other: Self) -> Self {
132 Dummy__bindgen_ty_1(self.0 | other.0)
133 }
134 }
135 impl ::std::ops::BitOrAssign for Dummy__bindgen_ty_1 {
136 #[inline]
bitor_assign(&mut self, rhs: Dummy__bindgen_ty_1)137 fn bitor_assign(&mut self, rhs: Dummy__bindgen_ty_1) {
138 self.0 |= rhs.0;
139 }
140 }
141 impl ::std::ops::BitAnd<Dummy__bindgen_ty_1> for Dummy__bindgen_ty_1 {
142 type Output = Self;
143 #[inline]
bitand(self, other: Self) -> Self144 fn bitand(self, other: Self) -> Self {
145 Dummy__bindgen_ty_1(self.0 & other.0)
146 }
147 }
148 impl ::std::ops::BitAndAssign for Dummy__bindgen_ty_1 {
149 #[inline]
bitand_assign(&mut self, rhs: Dummy__bindgen_ty_1)150 fn bitand_assign(&mut self, rhs: Dummy__bindgen_ty_1) {
151 self.0 &= rhs.0;
152 }
153 }
154 #[repr(transparent)]
155 #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
156 pub struct Dummy__bindgen_ty_1(pub ::std::os::raw::c_uint);
157 #[test]
bindgen_test_layout_Dummy()158 fn bindgen_test_layout_Dummy() {
159 assert_eq!(
160 ::std::mem::size_of::<Dummy>(),
161 1usize,
162 concat!("Size of: ", stringify!(Dummy))
163 );
164 assert_eq!(
165 ::std::mem::align_of::<Dummy>(),
166 1usize,
167 concat!("Alignment of ", stringify!(Dummy))
168 );
169 }
170