@@ -19,19 +19,14 @@ fn size_of_basic() {
1919}
2020
2121#[ test]
22- #[ cfg( any( target_arch = "x86" ,
23- target_arch = "arm" ,
24- target_arch = "mips" ,
25- target_arch = "mipsel" ,
26- target_arch = "powerpc" ) ) ]
22+ #[ cfg( target_pointer_width = "32" ) ]
2723fn size_of_32 ( ) {
2824 assert_eq ! ( size_of:: <uint>( ) , 4 u) ;
2925 assert_eq ! ( size_of:: <* const uint>( ) , 4 u) ;
3026}
3127
3228#[ test]
33- #[ cfg( any( target_arch = "x86_64" ,
34- target_arch = "aarch64" ) ) ]
29+ #[ cfg( target_pointer_width = "64" ) ]
3530fn size_of_64 ( ) {
3631 assert_eq ! ( size_of:: <uint>( ) , 8 u) ;
3732 assert_eq ! ( size_of:: <* const uint>( ) , 8 u) ;
@@ -53,19 +48,14 @@ fn align_of_basic() {
5348}
5449
5550#[ test]
56- #[ cfg( any( target_arch = "x86" ,
57- target_arch = "arm" ,
58- target_arch = "mips" ,
59- target_arch = "mipsel" ,
60- target_arch = "powerpc" ) ) ]
51+ #[ cfg( target_pointer_width = "32" ) ]
6152fn align_of_32 ( ) {
6253 assert_eq ! ( align_of:: <uint>( ) , 4 u) ;
6354 assert_eq ! ( align_of:: <* const uint>( ) , 4 u) ;
6455}
6556
6657#[ test]
67- #[ cfg( any( target_arch = "x86_64" ,
68- target_arch = "aarch64" ) ) ]
58+ #[ cfg( target_pointer_width = "64" ) ]
6959fn align_of_64 ( ) {
7060 assert_eq ! ( align_of:: <uint>( ) , 8 u) ;
7161 assert_eq ! ( align_of:: <* const uint>( ) , 8 u) ;
0 commit comments