@@ -53,15 +53,49 @@ impl <T> ::std::fmt::Debug for __BindgenUnionField<T> {
53
53
pub struct C {
54
54
pub a : :: std:: os:: raw:: c_int ,
55
55
pub big_array : [ :: std:: os:: raw:: c_char ; 33usize ] ,
56
- pub zero_length_array : __IncompleteArrayField < :: std:: os:: raw:: c_char > ,
57
- pub incomplete_array : __IncompleteArrayField < :: std:: os:: raw:: c_char > ,
58
56
}
59
57
#[ test]
60
58
fn bindgen_test_layout_C ( ) {
61
59
assert_eq ! ( :: std:: mem:: size_of:: <C >( ) , 40usize ) ;
62
60
assert_eq ! ( :: std:: mem:: align_of:: <C >( ) , 4usize ) ;
63
61
}
64
62
#[ repr( C ) ]
63
+ pub struct C_with_zero_length_array {
64
+ pub a : :: std:: os:: raw:: c_int ,
65
+ pub big_array : [ :: std:: os:: raw:: c_char ; 33usize ] ,
66
+ pub zero_length_array : __IncompleteArrayField < :: std:: os:: raw:: c_char > ,
67
+ }
68
+ #[ test]
69
+ fn bindgen_test_layout_C_with_zero_length_array ( ) {
70
+ assert_eq ! ( :: std:: mem:: size_of:: <C_with_zero_length_array >( ) , 40usize ) ;
71
+ assert_eq ! ( :: std:: mem:: align_of:: <C_with_zero_length_array >( ) , 4usize ) ;
72
+ }
73
+ #[ repr( C ) ]
74
+ pub struct C_with_incomplete_array {
75
+ pub a : :: std:: os:: raw:: c_int ,
76
+ pub big_array : [ :: std:: os:: raw:: c_char ; 33usize ] ,
77
+ pub incomplete_array : __IncompleteArrayField < :: std:: os:: raw:: c_char > ,
78
+ }
79
+ #[ test]
80
+ fn bindgen_test_layout_C_with_incomplete_array ( ) {
81
+ assert_eq ! ( :: std:: mem:: size_of:: <C_with_incomplete_array >( ) , 40usize ) ;
82
+ assert_eq ! ( :: std:: mem:: align_of:: <C_with_incomplete_array >( ) , 4usize ) ;
83
+ }
84
+ #[ repr( C ) ]
85
+ pub struct C_with_zero_length_array_and_incomplete_array {
86
+ pub a : :: std:: os:: raw:: c_int ,
87
+ pub big_array : [ :: std:: os:: raw:: c_char ; 33usize ] ,
88
+ pub zero_length_array : __IncompleteArrayField < :: std:: os:: raw:: c_char > ,
89
+ pub incomplete_array : __IncompleteArrayField < :: std:: os:: raw:: c_char > ,
90
+ }
91
+ #[ test]
92
+ fn bindgen_test_layout_C_with_zero_length_array_and_incomplete_array ( ) {
93
+ assert_eq ! ( :: std:: mem:: size_of:: <C_with_zero_length_array_and_incomplete_array >( )
94
+ , 40usize ) ;
95
+ assert_eq ! ( :: std:: mem:: align_of:: <C_with_zero_length_array_and_incomplete_array >( )
96
+ , 4usize ) ;
97
+ }
98
+ #[ repr( C ) ]
65
99
#[ derive( Debug ) ]
66
100
pub struct WithDtor {
67
101
pub b : :: std:: os:: raw:: c_int ,
0 commit comments