Skip to content

Commit 0da4629

Browse files
committed
Fill in ignore reasons in all #[ignore] attributes
1 parent 5ee1cab commit 0da4629

File tree

2 files changed

+25
-51
lines changed

2 files changed

+25
-51
lines changed

tests/test_size.rs

Lines changed: 23 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
#![allow(unused_attributes)]
2+
13
extern crate proc_macro;
24

35
use std::mem;
46

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")]
1010
#[test]
1111
fn test_proc_macro_size() {
1212
assert_eq!(mem::size_of::<proc_macro::Span>(), 4);
@@ -18,15 +18,10 @@ fn test_proc_macro_size() {
1818
assert_eq!(mem::size_of::<proc_macro::TokenStream>(), 4);
1919
}
2020

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")]
3025
#[test]
3126
fn test_proc_macro2_fallback_size_without_locations() {
3227
assert_eq!(mem::size_of::<proc_macro2::Span>(), 0);
@@ -38,15 +33,10 @@ fn test_proc_macro2_fallback_size_without_locations() {
3833
assert_eq!(mem::size_of::<proc_macro2::TokenStream>(), 8);
3934
}
4035

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")]
5040
#[test]
5141
fn test_proc_macro2_fallback_size_with_locations() {
5242
assert_eq!(mem::size_of::<proc_macro2::Span>(), 8);
@@ -58,19 +48,11 @@ fn test_proc_macro2_fallback_size_with_locations() {
5848
assert_eq!(mem::size_of::<proc_macro2::TokenStream>(), 8);
5949
}
6050

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")]
7456
#[test]
7557
fn test_proc_macro2_wrapper_size_without_locations() {
7658
assert_eq!(mem::size_of::<proc_macro2::Span>(), 4);
@@ -82,19 +64,11 @@ fn test_proc_macro2_wrapper_size_without_locations() {
8264
assert_eq!(mem::size_of::<proc_macro2::TokenStream>(), 32);
8365
}
8466

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")]
9872
#[test]
9973
fn test_proc_macro2_wrapper_size_with_locations() {
10074
assert_eq!(mem::size_of::<proc_macro2::Span>(), 12);

tests/ui/compiletest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#[rustversion::attr(not(nightly), ignore)]
2-
#[cfg_attr(miri, ignore)]
1+
#[rustversion::attr(not(nightly), ignore = "requires nightly")]
2+
#[rustversion::attr(nightly, cfg_attr(miri, ignore = "incompatible with miri"))]
33
#[test]
44
fn ui() {
55
let t = trybuild::TestCases::new();

0 commit comments

Comments
 (0)