@@ -19,19 +19,14 @@ fn size_of_basic() {
19
19
}
20
20
21
21
#[ 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" ) ]
27
23
fn size_of_32 ( ) {
28
24
assert_eq ! ( size_of:: <uint>( ) , 4 u) ;
29
25
assert_eq ! ( size_of:: <* const uint>( ) , 4 u) ;
30
26
}
31
27
32
28
#[ test]
33
- #[ cfg( any( target_arch = "x86_64" ,
34
- target_arch = "aarch64" ) ) ]
29
+ #[ cfg( target_pointer_width = "64" ) ]
35
30
fn size_of_64 ( ) {
36
31
assert_eq ! ( size_of:: <uint>( ) , 8 u) ;
37
32
assert_eq ! ( size_of:: <* const uint>( ) , 8 u) ;
@@ -53,19 +48,14 @@ fn align_of_basic() {
53
48
}
54
49
55
50
#[ 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" ) ]
61
52
fn align_of_32 ( ) {
62
53
assert_eq ! ( align_of:: <uint>( ) , 4 u) ;
63
54
assert_eq ! ( align_of:: <* const uint>( ) , 4 u) ;
64
55
}
65
56
66
57
#[ test]
67
- #[ cfg( any( target_arch = "x86_64" ,
68
- target_arch = "aarch64" ) ) ]
58
+ #[ cfg( target_pointer_width = "64" ) ]
69
59
fn align_of_64 ( ) {
70
60
assert_eq ! ( align_of:: <uint>( ) , 8 u) ;
71
61
assert_eq ! ( align_of:: <* const uint>( ) , 8 u) ;
0 commit comments