@@ -13,68 +13,57 @@ pub mod root {
13
13
use self :: super :: super :: root;
14
14
#[ repr( C ) ]
15
15
#[ derive( Debug , Default , Copy ) ]
16
- pub struct _bindgen_ty_1 {
16
+ pub struct typedef_struct {
17
17
pub foo : :: std:: os:: raw:: c_int ,
18
18
}
19
19
#[ test]
20
- fn bindgen_test_layout__bindgen_ty_1 ( ) {
21
- assert_eq ! ( :: std:: mem:: size_of:: <_bindgen_ty_1 >( ) , 4usize ,
22
- concat ! ( "Size of: " , stringify ! ( _bindgen_ty_1 )
20
+ fn bindgen_test_layout_typedef_struct ( ) {
21
+ assert_eq ! ( :: std:: mem:: size_of:: <typedef_struct >( ) , 4usize ,
22
+ concat ! ( "Size of: " , stringify ! ( typedef_struct )
23
23
) ) ;
24
- assert_eq ! ( :: std:: mem:: align_of:: <_bindgen_ty_1 >( ) , 4usize ,
24
+ assert_eq ! ( :: std:: mem:: align_of:: <typedef_struct >( ) , 4usize ,
25
25
concat ! (
26
- "Alignment of " , stringify ! ( _bindgen_ty_1 ) ) ) ;
26
+ "Alignment of " , stringify ! ( typedef_struct ) ) ) ;
27
27
assert_eq ! ( unsafe {
28
- & ( * ( 0 as * const _bindgen_ty_1 ) ) . foo as *
28
+ & ( * ( 0 as * const typedef_struct ) ) . foo as *
29
29
const _ as usize } , 0usize , concat ! (
30
- "Alignment of field: " , stringify ! ( _bindgen_ty_1 )
31
- , "::" , stringify ! ( foo ) ) ) ;
30
+ "Alignment of field: " , stringify ! ( typedef_struct
31
+ ) , "::" , stringify ! ( foo ) ) ) ;
32
32
}
33
- impl Clone for _bindgen_ty_1 {
33
+ impl Clone for typedef_struct {
34
34
fn clone ( & self ) -> Self { * self }
35
35
}
36
- pub type typedef_struct = root:: whatever:: _bindgen_ty_1 ;
37
- pub const whatever_BAR: root:: whatever:: _bindgen_ty_2 =
38
- _bindgen_ty_2:: BAR ;
39
36
#[ repr( u32 ) ]
40
37
#[ derive( Debug , Copy , Clone , PartialEq , Eq , Hash ) ]
41
- pub enum _bindgen_ty_2 { BAR = 1 , }
42
- pub use self :: super :: super :: root:: whatever:: _bindgen_ty_2 as
43
- typedef_enum;
38
+ pub enum typedef_enum { BAR = 1 , }
44
39
}
45
40
pub mod _bindgen_mod_id_12 {
46
41
#[ allow( unused_imports) ]
47
42
use self :: super :: super :: root;
48
43
#[ repr( C ) ]
49
44
#[ derive( Debug , Default , Copy ) ]
50
- pub struct _bindgen_ty_1 {
45
+ pub struct typedef_struct {
51
46
pub foo : :: std:: os:: raw:: c_int ,
52
47
}
53
48
#[ test]
54
- fn bindgen_test_layout__bindgen_ty_1 ( ) {
55
- assert_eq ! ( :: std:: mem:: size_of:: <_bindgen_ty_1 >( ) , 4usize ,
56
- concat ! ( "Size of: " , stringify ! ( _bindgen_ty_1 )
49
+ fn bindgen_test_layout_typedef_struct ( ) {
50
+ assert_eq ! ( :: std:: mem:: size_of:: <typedef_struct >( ) , 4usize ,
51
+ concat ! ( "Size of: " , stringify ! ( typedef_struct )
57
52
) ) ;
58
- assert_eq ! ( :: std:: mem:: align_of:: <_bindgen_ty_1 >( ) , 4usize ,
53
+ assert_eq ! ( :: std:: mem:: align_of:: <typedef_struct >( ) , 4usize ,
59
54
concat ! (
60
- "Alignment of " , stringify ! ( _bindgen_ty_1 ) ) ) ;
55
+ "Alignment of " , stringify ! ( typedef_struct ) ) ) ;
61
56
assert_eq ! ( unsafe {
62
- & ( * ( 0 as * const _bindgen_ty_1 ) ) . foo as *
57
+ & ( * ( 0 as * const typedef_struct ) ) . foo as *
63
58
const _ as usize } , 0usize , concat ! (
64
- "Alignment of field: " , stringify ! ( _bindgen_ty_1 )
65
- , "::" , stringify ! ( foo ) ) ) ;
59
+ "Alignment of field: " , stringify ! ( typedef_struct
60
+ ) , "::" , stringify ! ( foo ) ) ) ;
66
61
}
67
- impl Clone for _bindgen_ty_1 {
62
+ impl Clone for typedef_struct {
68
63
fn clone ( & self ) -> Self { * self }
69
64
}
70
- pub type typedef_struct = root:: _bindgen_mod_id_12:: _bindgen_ty_1 ;
71
- pub const _bindgen_mod_id_12_BAR:
72
- root:: _bindgen_mod_id_12:: _bindgen_ty_2 =
73
- _bindgen_ty_2:: BAR ;
74
65
#[ repr( u32 ) ]
75
66
#[ derive( Debug , Copy , Clone , PartialEq , Eq , Hash ) ]
76
- pub enum _bindgen_ty_2 { BAR = 1 , }
77
- pub use self :: super :: super :: root:: _bindgen_mod_id_12:: _bindgen_ty_2 as
78
- typedef_enum;
67
+ pub enum typedef_enum { BAR = 1 , }
79
68
}
80
69
}
0 commit comments