@@ -37,6 +37,7 @@ 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 ] > ,
40
41
}
41
42
#[ test]
42
43
fn bindgen_test_layout_C ( ) {
@@ -73,6 +74,11 @@ fn bindgen_test_layout_C() {
73
74
} , 26usize , concat ! (
74
75
"Alignment of field: " , stringify ! ( C ) , "::" , stringify
75
76
! ( mBConstChar ) ) ) ;
77
+ assert_eq ! ( unsafe {
78
+ & ( * ( 0 as * const C ) ) . mBArray as * const _ as usize } ,
79
+ 28usize , concat ! (
80
+ "Alignment of field: " , stringify ! ( C ) , "::" , stringify
81
+ ! ( mBArray ) ) ) ;
76
82
}
77
83
impl Clone for C {
78
84
fn clone ( & self ) -> Self { * self }
@@ -317,7 +323,7 @@ fn __bindgen_test_layout_B_open0_unsigned_int_close0_instantiation() {
317
323
B <:: std:: os:: raw:: c_uint> ) ) ) ;
318
324
}
319
325
#[ test]
320
- fn __bindgen_test_layout_B_open0__bindgen_ty_id_113_close0_instantiation ( ) {
326
+ fn __bindgen_test_layout_B_open0_ptr_const_int_close0_instantiation ( ) {
321
327
assert_eq ! ( :: std:: mem:: size_of:: <B <* const :: std:: os:: raw:: c_int>>( ) ,
322
328
8usize , concat ! (
323
329
"Size of template specialization: " , stringify ! (
@@ -368,6 +374,17 @@ fn __bindgen_test_layout_B_open0_const_char16_t_close0_instantiation() {
368
374
) ) ) ;
369
375
}
370
376
#[ test]
377
+ fn __bindgen_test_layout_B_open0_array_int_1_close0_instantiation ( ) {
378
+ assert_eq ! ( :: std:: mem:: size_of:: <B <[ :: std:: os:: raw:: c_int; 1usize ] >>( ) ,
379
+ 4usize , concat ! (
380
+ "Size of template specialization: " , stringify ! (
381
+ B <[ :: std:: os:: raw:: c_int; 1usize ] > ) ) ) ;
382
+ assert_eq ! ( :: std:: mem:: align_of:: <B <[ :: std:: os:: raw:: c_int; 1usize ] >>( ) ,
383
+ 4usize , concat ! (
384
+ "Alignment of template specialization: " , stringify ! (
385
+ B <[ :: std:: os:: raw:: c_int; 1usize ] > ) ) ) ;
386
+ }
387
+ #[ test]
371
388
fn __bindgen_test_layout_Foo_open0_int_int_close0_instantiation_1 ( ) {
372
389
assert_eq ! ( :: std:: mem:: size_of:: <Foo <:: std:: os:: raw:: c_int>>( ) , 24usize ,
373
390
concat ! (
@@ -379,7 +396,7 @@ fn __bindgen_test_layout_Foo_open0_int_int_close0_instantiation_1() {
379
396
Foo <:: std:: os:: raw:: c_int> ) ) ) ;
380
397
}
381
398
#[ test]
382
- fn __bindgen_test_layout_Rooted_open0__bindgen_ty_id_144_close0_instantiation ( ) {
399
+ fn __bindgen_test_layout_Rooted_open0_ptr_void_close0_instantiation ( ) {
383
400
assert_eq ! ( :: std:: mem:: size_of:: <Rooted <* mut :: std:: os:: raw:: c_void>>( ) ,
384
401
24usize , concat ! (
385
402
"Size of template specialization: " , stringify ! (
@@ -390,7 +407,7 @@ fn __bindgen_test_layout_Rooted_open0__bindgen_ty_id_144_close0_instantiation()
390
407
Rooted <* mut :: std:: os:: raw:: c_void> ) ) ) ;
391
408
}
392
409
#[ test]
393
- fn __bindgen_test_layout_Rooted_open0__bindgen_ty_id_150_close0_instantiation ( ) {
410
+ fn __bindgen_test_layout_Rooted_open0_ptr_void_close0_instantiation_1 ( ) {
394
411
assert_eq ! ( :: std:: mem:: size_of:: <Rooted <* mut :: std:: os:: raw:: c_void>>( ) ,
395
412
24usize , concat ! (
396
413
"Size of template specialization: " , stringify ! (
0 commit comments