@@ -3,7 +3,10 @@ extern crate proc_macro;
3
3
use std:: mem;
4
4
5
5
#[ rustversion:: attr( before( 1.64 ) , ignore) ]
6
- #[ rustversion:: attr( since( 1.64 ) , cfg_attr( randomize_layout, ignore) ) ]
6
+ #[ rustversion:: attr(
7
+ since( 1.64 ) ,
8
+ cfg_attr( any( randomize_layout, not( target_pointer_width = "64" ) ) , ignore)
9
+ ) ]
7
10
#[ test]
8
11
fn test_proc_macro_size ( ) {
9
12
assert_eq ! ( mem:: size_of:: <proc_macro:: Span >( ) , 4 ) ;
@@ -15,7 +18,15 @@ fn test_proc_macro_size() {
15
18
assert_eq ! ( mem:: size_of:: <proc_macro:: TokenStream >( ) , 4 ) ;
16
19
}
17
20
18
- #[ cfg_attr( any( randomize_layout, wrap_proc_macro, span_locations) , ignore) ]
21
+ #[ cfg_attr(
22
+ any(
23
+ randomize_layout,
24
+ not( target_pointer_width = "64" ) ,
25
+ wrap_proc_macro,
26
+ span_locations
27
+ ) ,
28
+ ignore
29
+ ) ]
19
30
#[ test]
20
31
fn test_proc_macro2_fallback_size_without_locations ( ) {
21
32
assert_eq ! ( mem:: size_of:: <proc_macro2:: Span >( ) , 0 ) ;
@@ -27,7 +38,15 @@ fn test_proc_macro2_fallback_size_without_locations() {
27
38
assert_eq ! ( mem:: size_of:: <proc_macro2:: TokenStream >( ) , 8 ) ;
28
39
}
29
40
30
- #[ cfg_attr( any( randomize_layout, wrap_proc_macro, not( span_locations) ) , ignore) ]
41
+ #[ cfg_attr(
42
+ any(
43
+ randomize_layout,
44
+ not( target_pointer_width = "64" ) ,
45
+ wrap_proc_macro,
46
+ not( span_locations)
47
+ ) ,
48
+ ignore
49
+ ) ]
31
50
#[ test]
32
51
fn test_proc_macro2_fallback_size_with_locations ( ) {
33
52
assert_eq ! ( mem:: size_of:: <proc_macro2:: Span >( ) , 8 ) ;
@@ -42,7 +61,15 @@ fn test_proc_macro2_fallback_size_with_locations() {
42
61
#[ rustversion:: attr( before( 1.71 ) , ignore) ]
43
62
#[ rustversion:: attr(
44
63
since( 1.71 ) ,
45
- cfg_attr( any( randomize_layout, not( wrap_proc_macro) , span_locations) , ignore)
64
+ cfg_attr(
65
+ any(
66
+ randomize_layout,
67
+ not( target_pointer_width = "64" ) ,
68
+ not( wrap_proc_macro) ,
69
+ span_locations
70
+ ) ,
71
+ ignore
72
+ )
46
73
) ]
47
74
#[ test]
48
75
fn test_proc_macro2_wrapper_size_without_locations ( ) {
@@ -59,7 +86,12 @@ fn test_proc_macro2_wrapper_size_without_locations() {
59
86
#[ rustversion:: attr(
60
87
since( 1.65 ) ,
61
88
cfg_attr(
62
- any( randomize_layout, not( wrap_proc_macro) , not( span_locations) ) ,
89
+ any(
90
+ randomize_layout,
91
+ not( target_pointer_width = "64" ) ,
92
+ not( wrap_proc_macro) ,
93
+ not( span_locations)
94
+ ) ,
63
95
ignore
64
96
)
65
97
) ]
0 commit comments