1
+ #![ allow( unused_attributes) ]
2
+
1
3
extern crate proc_macro;
2
4
3
5
use std:: mem;
4
6
5
- #[ rustversion:: attr( before( 1.64 ) , ignore) ]
6
- #[ rustversion:: attr(
7
- since( 1.64 ) ,
8
- cfg_attr( any( randomize_layout, not( target_pointer_width = "64" ) ) , ignore)
9
- ) ]
7
+ #[ rustversion:: attr( before( 1.64 ) , ignore = "requires Rust 1.64+" ) ]
8
+ #[ cfg_attr( not( target_pointer_width = "64" ) , ignore = "only applicable to 64-bit" ) ]
9
+ #[ cfg_attr( randomize_layout, ignore = "disabled due to randomized layout" ) ]
10
10
#[ test]
11
11
fn test_proc_macro_size ( ) {
12
12
assert_eq ! ( mem:: size_of:: <proc_macro:: Span >( ) , 4 ) ;
@@ -18,15 +18,10 @@ fn test_proc_macro_size() {
18
18
assert_eq ! ( mem:: size_of:: <proc_macro:: TokenStream >( ) , 4 ) ;
19
19
}
20
20
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
- ) ]
21
+ #[ cfg_attr( not( target_pointer_width = "64" ) , ignore = "only applicable to 64-bit" ) ]
22
+ #[ cfg_attr( randomize_layout, ignore = "disabled due to randomized layout" ) ]
23
+ #[ cfg_attr( wrap_proc_macro, ignore = "wrapper mode" ) ]
24
+ #[ cfg_attr( span_locations, ignore = "span locations are on" ) ]
30
25
#[ test]
31
26
fn test_proc_macro2_fallback_size_without_locations ( ) {
32
27
assert_eq ! ( mem:: size_of:: <proc_macro2:: Span >( ) , 0 ) ;
@@ -38,15 +33,10 @@ fn test_proc_macro2_fallback_size_without_locations() {
38
33
assert_eq ! ( mem:: size_of:: <proc_macro2:: TokenStream >( ) , 8 ) ;
39
34
}
40
35
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
- ) ]
36
+ #[ cfg_attr( not( target_pointer_width = "64" ) , ignore = "only applicable to 64-bit" ) ]
37
+ #[ cfg_attr( randomize_layout, ignore = "disabled due to randomized layout" ) ]
38
+ #[ cfg_attr( wrap_proc_macro, ignore = "wrapper mode" ) ]
39
+ #[ cfg_attr( not( span_locations) , ignore = "span locations are off" ) ]
50
40
#[ test]
51
41
fn test_proc_macro2_fallback_size_with_locations ( ) {
52
42
assert_eq ! ( mem:: size_of:: <proc_macro2:: Span >( ) , 8 ) ;
@@ -58,19 +48,11 @@ fn test_proc_macro2_fallback_size_with_locations() {
58
48
assert_eq ! ( mem:: size_of:: <proc_macro2:: TokenStream >( ) , 8 ) ;
59
49
}
60
50
61
- #[ rustversion:: attr( before( 1.71 ) , ignore) ]
62
- #[ rustversion:: attr(
63
- since( 1.71 ) ,
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
- )
73
- ) ]
51
+ #[ rustversion:: attr( before( 1.71 ) , ignore = "requires Rust 1.71+" ) ]
52
+ #[ cfg_attr( not( target_pointer_width = "64" ) , ignore = "only applicable to 64-bit" ) ]
53
+ #[ cfg_attr( randomize_layout, ignore = "disabled due to randomized layout" ) ]
54
+ #[ cfg_attr( not( wrap_proc_macro) , ignore = "fallback mode" ) ]
55
+ #[ cfg_attr( span_locations, ignore = "span locations are on" ) ]
74
56
#[ test]
75
57
fn test_proc_macro2_wrapper_size_without_locations ( ) {
76
58
assert_eq ! ( mem:: size_of:: <proc_macro2:: Span >( ) , 4 ) ;
@@ -82,19 +64,11 @@ fn test_proc_macro2_wrapper_size_without_locations() {
82
64
assert_eq ! ( mem:: size_of:: <proc_macro2:: TokenStream >( ) , 32 ) ;
83
65
}
84
66
85
- #[ rustversion:: attr( before( 1.65 ) , ignore) ]
86
- #[ rustversion:: attr(
87
- since( 1.65 ) ,
88
- cfg_attr(
89
- any(
90
- randomize_layout,
91
- not( target_pointer_width = "64" ) ,
92
- not( wrap_proc_macro) ,
93
- not( span_locations)
94
- ) ,
95
- ignore
96
- )
97
- ) ]
67
+ #[ rustversion:: attr( before( 1.65 ) , ignore = "requires Rust 1.65+" ) ]
68
+ #[ cfg_attr( not( target_pointer_width = "64" ) , ignore = "only applicable to 64-bit" ) ]
69
+ #[ cfg_attr( randomize_layout, ignore = "disabled due to randomized layout" ) ]
70
+ #[ cfg_attr( not( wrap_proc_macro) , ignore = "fallback mode" ) ]
71
+ #[ cfg_attr( not( span_locations) , ignore = "span locations are off" ) ]
98
72
#[ test]
99
73
fn test_proc_macro2_wrapper_size_with_locations ( ) {
100
74
assert_eq ! ( mem:: size_of:: <proc_macro2:: Span >( ) , 12 ) ;
0 commit comments