@@ -37,10 +37,12 @@ pub struct C {
37
37
pub mBVolatile : B < :: std:: os:: raw:: c_int > ,
38
38
pub mBConstBool : B < bool > ,
39
39
pub mBConstChar : B < u16 > ,
40
+ pub mBArray : B < [ :: std:: os:: raw:: c_int ; 1usize ] > ,
41
+ pub mBConstArray : B < [ :: std:: os:: raw:: c_int ; 1usize ] > ,
40
42
}
41
43
#[ test]
42
44
fn bindgen_test_layout_C ( ) {
43
- assert_eq ! ( :: std:: mem:: size_of:: <C >( ) , 32usize , concat ! (
45
+ assert_eq ! ( :: std:: mem:: size_of:: <C >( ) , 40usize , concat ! (
44
46
"Size of: " , stringify ! ( C ) ) ) ;
45
47
assert_eq ! ( :: std:: mem:: align_of:: <C >( ) , 8usize , concat ! (
46
48
"Alignment of " , stringify ! ( C ) ) ) ;
@@ -73,6 +75,16 @@ fn bindgen_test_layout_C() {
73
75
} , 26usize , concat ! (
74
76
"Alignment of field: " , stringify ! ( C ) , "::" , stringify
75
77
! ( mBConstChar ) ) ) ;
78
+ assert_eq ! ( unsafe {
79
+ & ( * ( 0 as * const C ) ) . mBArray as * const _ as usize } ,
80
+ 28usize , concat ! (
81
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
82
+ ! ( mBArray ) ) ) ;
83
+ assert_eq ! ( unsafe {
84
+ & ( * ( 0 as * const C ) ) . mBConstArray as * const _ as
85
+ usize } , 32usize , concat ! (
86
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
87
+ ! ( mBConstArray ) ) ) ;
76
88
}
77
89
impl Clone for C {
78
90
fn clone ( & self ) -> Self { * self }
@@ -317,7 +329,7 @@ fn __bindgen_test_layout_B_open0_unsigned_int_close0_instantiation() {
317
329
B <:: std:: os:: raw:: c_uint> ) ) ) ;
318
330
}
319
331
#[ test]
320
- fn __bindgen_test_layout_B_open0__bindgen_ty_id_113_close0_instantiation ( ) {
332
+ fn __bindgen_test_layout_B_open0_ptr_const_int_close0_instantiation ( ) {
321
333
assert_eq ! ( :: std:: mem:: size_of:: <B <* const :: std:: os:: raw:: c_int>>( ) ,
322
334
8usize , concat ! (
323
335
"Size of template specialization: " , stringify ! (
@@ -368,6 +380,28 @@ fn __bindgen_test_layout_B_open0_const_char16_t_close0_instantiation() {
368
380
) ) ) ;
369
381
}
370
382
#[ test]
383
+ fn __bindgen_test_layout_B_open0_array_int_1_close0_instantiation ( ) {
384
+ assert_eq ! ( :: std:: mem:: size_of:: <B <[ :: std:: os:: raw:: c_int; 1usize ] >>( ) ,
385
+ 4usize , concat ! (
386
+ "Size of template specialization: " , stringify ! (
387
+ B <[ :: std:: os:: raw:: c_int; 1usize ] > ) ) ) ;
388
+ assert_eq ! ( :: std:: mem:: align_of:: <B <[ :: std:: os:: raw:: c_int; 1usize ] >>( ) ,
389
+ 4usize , concat ! (
390
+ "Alignment of template specialization: " , stringify ! (
391
+ B <[ :: std:: os:: raw:: c_int; 1usize ] > ) ) ) ;
392
+ }
393
+ #[ test]
394
+ fn __bindgen_test_layout_B_open0_array_const_int_1_close0_instantiation ( ) {
395
+ assert_eq ! ( :: std:: mem:: size_of:: <B <[ :: std:: os:: raw:: c_int; 1usize ] >>( ) ,
396
+ 4usize , concat ! (
397
+ "Size of template specialization: " , stringify ! (
398
+ B <[ :: std:: os:: raw:: c_int; 1usize ] > ) ) ) ;
399
+ assert_eq ! ( :: std:: mem:: align_of:: <B <[ :: std:: os:: raw:: c_int; 1usize ] >>( ) ,
400
+ 4usize , concat ! (
401
+ "Alignment of template specialization: " , stringify ! (
402
+ B <[ :: std:: os:: raw:: c_int; 1usize ] > ) ) ) ;
403
+ }
404
+ #[ test]
371
405
fn __bindgen_test_layout_Foo_open0_int_int_close0_instantiation_1 ( ) {
372
406
assert_eq ! ( :: std:: mem:: size_of:: <Foo <:: std:: os:: raw:: c_int>>( ) , 24usize ,
373
407
concat ! (
@@ -379,7 +413,7 @@ fn __bindgen_test_layout_Foo_open0_int_int_close0_instantiation_1() {
379
413
Foo <:: std:: os:: raw:: c_int> ) ) ) ;
380
414
}
381
415
#[ test]
382
- fn __bindgen_test_layout_Rooted_open0__bindgen_ty_id_144_close0_instantiation ( ) {
416
+ fn __bindgen_test_layout_Rooted_open0_ptr_void_close0_instantiation ( ) {
383
417
assert_eq ! ( :: std:: mem:: size_of:: <Rooted <* mut :: std:: os:: raw:: c_void>>( ) ,
384
418
24usize , concat ! (
385
419
"Size of template specialization: " , stringify ! (
@@ -390,7 +424,7 @@ fn __bindgen_test_layout_Rooted_open0__bindgen_ty_id_144_close0_instantiation()
390
424
Rooted <* mut :: std:: os:: raw:: c_void> ) ) ) ;
391
425
}
392
426
#[ test]
393
- fn __bindgen_test_layout_Rooted_open0__bindgen_ty_id_150_close0_instantiation ( ) {
427
+ fn __bindgen_test_layout_Rooted_open0_ptr_void_close0_instantiation_1 ( ) {
394
428
assert_eq ! ( :: std:: mem:: size_of:: <Rooted <* mut :: std:: os:: raw:: c_void>>( ) ,
395
429
24usize , concat ! (
396
430
"Size of template specialization: " , stringify ! (
0 commit comments