File tree 6 files changed +135
-0
lines changed 6 files changed +135
-0
lines changed Original file line number Diff line number Diff line change
1
+ /* automatically generated by rust-bindgen */
2
+
3
+ #[ repr( C ) ]
4
+ #[ derive( Debug , Copy , PartialEq ) ]
5
+ pub struct NoPartialEq {
6
+ pub _bindgen_opaque_blob : u32 ,
7
+ }
8
+ #[ test]
9
+ fn bindgen_test_layout_NoPartialEq ( ) {
10
+ assert_eq ! (
11
+ :: std:: mem:: size_of:: <NoPartialEq >( ) ,
12
+ 4usize ,
13
+ concat!( "Size of: " , stringify!( NoPartialEq ) )
14
+ ) ;
15
+ assert_eq ! (
16
+ :: std:: mem:: align_of:: <NoPartialEq >( ) ,
17
+ 4usize ,
18
+ concat!( "Alignment of " , stringify!( NoPartialEq ) )
19
+ ) ;
20
+ }
21
+ impl Clone for NoPartialEq {
22
+ fn clone ( & self ) -> Self {
23
+ * self
24
+ }
25
+ }
Original file line number Diff line number Diff line change
1
+ /* automatically generated by rust-bindgen */
2
+
3
+ #[ repr( C ) ]
4
+ #[ derive( Debug , Copy , PartialEq ) ]
5
+ pub struct NoPartialEq {
6
+ pub i : :: std:: os:: raw:: c_int ,
7
+ }
8
+ #[ test]
9
+ fn bindgen_test_layout_NoPartialEq ( ) {
10
+ assert_eq ! (
11
+ :: std:: mem:: size_of:: <NoPartialEq >( ) ,
12
+ 4usize ,
13
+ concat!( "Size of: " , stringify!( NoPartialEq ) )
14
+ ) ;
15
+ assert_eq ! (
16
+ :: std:: mem:: align_of:: <NoPartialEq >( ) ,
17
+ 4usize ,
18
+ concat!( "Alignment of " , stringify!( NoPartialEq ) )
19
+ ) ;
20
+ assert_eq ! (
21
+ unsafe { & ( * ( 0 as * const NoPartialEq ) ) . i as * const _ as usize } ,
22
+ 0usize ,
23
+ concat!(
24
+ "Alignment of field: " ,
25
+ stringify!( NoPartialEq ) ,
26
+ "::" ,
27
+ stringify!( i)
28
+ )
29
+ ) ;
30
+ }
31
+ impl Clone for NoPartialEq {
32
+ fn clone ( & self ) -> Self {
33
+ * self
34
+ }
35
+ }
Original file line number Diff line number Diff line change
1
+ /* automatically generated by rust-bindgen */
2
+
3
+ #[ repr( C ) ]
4
+ #[ derive( Debug , Copy ) ]
5
+ pub struct NoPartialEq {
6
+ pub _address : u8 ,
7
+ }
8
+ #[ test]
9
+ fn bindgen_test_layout_NoPartialEq ( ) {
10
+ assert_eq ! (
11
+ :: std:: mem:: size_of:: <NoPartialEq >( ) ,
12
+ 1usize ,
13
+ concat!( "Size of: " , stringify!( NoPartialEq ) )
14
+ ) ;
15
+ assert_eq ! (
16
+ :: std:: mem:: align_of:: <NoPartialEq >( ) ,
17
+ 1usize ,
18
+ concat!( "Alignment of " , stringify!( NoPartialEq ) )
19
+ ) ;
20
+ }
21
+ impl Clone for NoPartialEq {
22
+ fn clone ( & self ) -> Self {
23
+ * self
24
+ }
25
+ }
26
+ #[ repr( C ) ]
27
+ #[ derive( Debug , Copy ) ]
28
+ pub struct WhitelistMe {
29
+ pub a : NoPartialEq ,
30
+ }
31
+ #[ test]
32
+ fn bindgen_test_layout_WhitelistMe ( ) {
33
+ assert_eq ! (
34
+ :: std:: mem:: size_of:: <WhitelistMe >( ) ,
35
+ 1usize ,
36
+ concat!( "Size of: " , stringify!( WhitelistMe ) )
37
+ ) ;
38
+ assert_eq ! (
39
+ :: std:: mem:: align_of:: <WhitelistMe >( ) ,
40
+ 1usize ,
41
+ concat!( "Alignment of " , stringify!( WhitelistMe ) )
42
+ ) ;
43
+ assert_eq ! (
44
+ unsafe { & ( * ( 0 as * const WhitelistMe ) ) . a as * const _ as usize } ,
45
+ 0usize ,
46
+ concat!(
47
+ "Alignment of field: " ,
48
+ stringify!( WhitelistMe ) ,
49
+ "::" ,
50
+ stringify!( a)
51
+ )
52
+ ) ;
53
+ }
54
+ impl Clone for WhitelistMe {
55
+ fn clone ( & self ) -> Self {
56
+ * self
57
+ }
58
+ }
Original file line number Diff line number Diff line change
1
+ // bindgen-flags --with-derive-partialeq --opaque-type "NoPartialEq" --no-partialeq "NoPartialEq"
2
+
3
+ class NoPartialEq {
4
+ int i;
5
+ };
Original file line number Diff line number Diff line change
1
+ // bindgen-flags: --with-derive-partialeq --whitelist-type "NoPartialEq" --no-partialeq "NoPartialEq"
2
+
3
+ class NoPartialEq {
4
+ int i;
5
+ };
Original file line number Diff line number Diff line change
1
+ // bindgen-flags: --with-derive-partialeq --whitelist-type "WhitelistMe" --no-partialeq "NoPartialEq"
2
+
3
+ struct NoPartialEq {};
4
+
5
+ class WhitelistMe {
6
+ NoPartialEq a;
7
+ };
You can’t perform that action at this time.
0 commit comments