@@ -36,7 +36,6 @@ fn test_non_overlapping(a: &(usize, usize), b: &(usize, usize)) {
3636 assert ! ( ( a. 1 <= b. 0 ) || ( b. 1 <= a. 0 ) ) ;
3737}
3838
39- #[ cfg_attr( test, test) ]
4039fn test_fields_non_overlapping ( ) {
4140 let fields = [
4241 span_of ! ( ReprRustStruct , x) ,
@@ -62,31 +61,17 @@ fn test_fields_non_overlapping() {
6261 test_non_overlapping ( & fields[ 3 ] , & fields[ 4 ] ) ;
6362}
6463
65- #[ cfg_attr( test, test) ]
6664fn test_fields_aligned ( ) {
67- assert_eq ! (
68- ( core:: mem:: offset_of!( ReprRustStruct , x) % ( core:: mem:: align_of:: <i32 >( ) ) ) ,
69- 0
70- ) ;
71- assert_eq ! (
72- ( core:: mem:: offset_of!( ReprRustStruct , y) % ( core:: mem:: align_of:: <[ u32 ; 4 ] >( ) ) ) ,
73- 0
74- ) ;
75- assert_eq ! (
76- ( core:: mem:: offset_of!( ReprRustStruct , z) % ( core:: mem:: align_of:: <f32 >( ) ) ) ,
77- 0
78- ) ;
79- assert_eq ! (
80- ( core:: mem:: offset_of!( ReprRustStruct , a) % ( core:: mem:: align_of:: <u128 >( ) ) ) ,
81- 0
82- ) ;
65+ assert_eq ! ( ( core:: mem:: offset_of!( ReprRustStruct , x) % ( core:: mem:: align_of:: <i32 >( ) ) ) , 0 ) ;
66+ assert_eq ! ( ( core:: mem:: offset_of!( ReprRustStruct , y) % ( core:: mem:: align_of:: <[ u32 ; 4 ] >( ) ) ) , 0 ) ;
67+ assert_eq ! ( ( core:: mem:: offset_of!( ReprRustStruct , z) % ( core:: mem:: align_of:: <f32 >( ) ) ) , 0 ) ;
68+ assert_eq ! ( ( core:: mem:: offset_of!( ReprRustStruct , a) % ( core:: mem:: align_of:: <u128 >( ) ) ) , 0 ) ;
8369 assert_eq ! (
8470 ( core:: mem:: offset_of!( ReprRustStruct , b) % ( core:: mem:: align_of:: <Overaligned >( ) ) ) ,
8571 0
8672 ) ;
8773}
8874
89- #[ cfg( not( test) ) ]
9075fn main ( ) {
9176 test_fields_non_overlapping ( ) ;
9277 test_fields_aligned ( ) ;
0 commit comments