Skip to content

Commit ee25791

Browse files
committed
Auto merge of #46523 - CrockAgile:update-fingerprint-tests-macros, r=michaelwoerister
Update fingerprint tests macros Part of #44924 r? @michaelwoerister
2 parents bb1bd88 + 3f0cc7c commit ee25791

File tree

7 files changed

+320
-404
lines changed

7 files changed

+320
-404
lines changed

src/test/incremental/hashes/closure_expressions.rs

+24-36
Original file line numberDiff line numberDiff line change
@@ -27,34 +27,30 @@
2727

2828
// Change closure body ---------------------------------------------------------
2929
#[cfg(cfail1)]
30-
fn change_closure_body() {
30+
pub fn change_closure_body() {
3131
let _ = || 1u32;
3232
}
3333

3434
#[cfg(not(cfail1))]
35-
#[rustc_clean(label="Hir", cfg="cfail2")]
36-
#[rustc_clean(label="Hir", cfg="cfail3")]
37-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
38-
#[rustc_clean(label="HirBody", cfg="cfail3")]
39-
fn change_closure_body() {
35+
#[rustc_clean(cfg="cfail2", except="HirBody")]
36+
#[rustc_clean(cfg="cfail3")]
37+
pub fn change_closure_body() {
4038
let _ = || 3u32;
4139
}
4240

4341

4442

4543
// Add parameter ---------------------------------------------------------------
4644
#[cfg(cfail1)]
47-
fn add_parameter() {
45+
pub fn add_parameter() {
4846
let x = 0u32;
4947
let _ = || x + 1;
5048
}
5149

5250
#[cfg(not(cfail1))]
53-
#[rustc_clean(label="Hir", cfg="cfail2")]
54-
#[rustc_clean(label="Hir", cfg="cfail3")]
55-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
56-
#[rustc_clean(label="HirBody", cfg="cfail3")]
57-
fn add_parameter() {
51+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")]
52+
#[rustc_clean(cfg="cfail3")]
53+
pub fn add_parameter() {
5854
let x = 0u32;
5955
let _ = |x: u32| x + 1;
6056
}
@@ -63,51 +59,45 @@ fn add_parameter() {
6359

6460
// Change parameter pattern ----------------------------------------------------
6561
#[cfg(cfail1)]
66-
fn change_parameter_pattern() {
62+
pub fn change_parameter_pattern() {
6763
let _ = |x: &u32| x;
6864
}
6965

7066
#[cfg(not(cfail1))]
71-
#[rustc_clean(label="Hir", cfg="cfail2")]
72-
#[rustc_clean(label="Hir", cfg="cfail3")]
73-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
74-
#[rustc_clean(label="HirBody", cfg="cfail3")]
75-
fn change_parameter_pattern() {
67+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")]
68+
#[rustc_clean(cfg="cfail3")]
69+
pub fn change_parameter_pattern() {
7670
let _ = |&x: &u32| x;
7771
}
7872

7973

8074

8175
// Add `move` to closure -------------------------------------------------------
8276
#[cfg(cfail1)]
83-
fn add_move() {
77+
pub fn add_move() {
8478
let _ = || 1;
8579
}
8680

8781
#[cfg(not(cfail1))]
88-
#[rustc_clean(label="Hir", cfg="cfail2")]
89-
#[rustc_clean(label="Hir", cfg="cfail3")]
90-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
91-
#[rustc_clean(label="HirBody", cfg="cfail3")]
92-
fn add_move() {
82+
#[rustc_clean(cfg="cfail2", except="HirBody")]
83+
#[rustc_clean(cfg="cfail3")]
84+
pub fn add_move() {
9385
let _ = move || 1;
9486
}
9587

9688

9789

9890
// Add type ascription to parameter --------------------------------------------
9991
#[cfg(cfail1)]
100-
fn add_type_ascription_to_parameter() {
92+
pub fn add_type_ascription_to_parameter() {
10193
let closure = |x| x + 1u32;
10294
let _: u32 = closure(1);
10395
}
10496

10597
#[cfg(not(cfail1))]
106-
#[rustc_clean(label="Hir", cfg="cfail2")]
107-
#[rustc_clean(label="Hir", cfg="cfail3")]
108-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
109-
#[rustc_clean(label="HirBody", cfg="cfail3")]
110-
fn add_type_ascription_to_parameter() {
98+
#[rustc_clean(cfg="cfail2", except="HirBody")]
99+
#[rustc_clean(cfg="cfail3")]
100+
pub fn add_type_ascription_to_parameter() {
111101
let closure = |x: u32| x + 1u32;
112102
let _: u32 = closure(1);
113103
}
@@ -116,17 +106,15 @@ fn add_type_ascription_to_parameter() {
116106

117107
// Change parameter type -------------------------------------------------------
118108
#[cfg(cfail1)]
119-
fn change_parameter_type() {
109+
pub fn change_parameter_type() {
120110
let closure = |x: u32| (x as u64) + 1;
121111
let _ = closure(1);
122112
}
123113

124114
#[cfg(not(cfail1))]
125-
#[rustc_clean(label="Hir", cfg="cfail2")]
126-
#[rustc_clean(label="Hir", cfg="cfail3")]
127-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
128-
#[rustc_clean(label="HirBody", cfg="cfail3")]
129-
fn change_parameter_type() {
115+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")]
116+
#[rustc_clean(cfg="cfail3")]
117+
pub fn change_parameter_type() {
130118
let closure = |x: u16| (x as u64) + 1;
131119
let _ = closure(1);
132120
}

src/test/incremental/hashes/for_loops.rs

+44-66
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
// Change loop body ------------------------------------------------------------
2929
#[cfg(cfail1)]
30-
fn change_loop_body() {
30+
pub fn change_loop_body() {
3131
let mut _x = 0;
3232
for _ in 0..1 {
3333
_x = 1;
@@ -36,11 +36,9 @@ fn change_loop_body() {
3636
}
3737

3838
#[cfg(not(cfail1))]
39-
#[rustc_clean(label="Hir", cfg="cfail2")]
40-
#[rustc_clean(label="Hir", cfg="cfail3")]
41-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
42-
#[rustc_clean(label="HirBody", cfg="cfail3")]
43-
fn change_loop_body() {
39+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")]
40+
#[rustc_clean(cfg="cfail3")]
41+
pub fn change_loop_body() {
4442
let mut _x = 0;
4543
for _ in 0..1 {
4644
_x = 2;
@@ -52,7 +50,7 @@ fn change_loop_body() {
5250

5351
// Change iteration variable name ----------------------------------------------
5452
#[cfg(cfail1)]
55-
fn change_iteration_variable_name() {
53+
pub fn change_iteration_variable_name() {
5654
let mut _x = 0;
5755
for _i in 0..1 {
5856
_x = 1;
@@ -61,11 +59,9 @@ fn change_iteration_variable_name() {
6159
}
6260

6361
#[cfg(not(cfail1))]
64-
#[rustc_clean(label="Hir", cfg="cfail2")]
65-
#[rustc_clean(label="Hir", cfg="cfail3")]
66-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
67-
#[rustc_clean(label="HirBody", cfg="cfail3")]
68-
fn change_iteration_variable_name() {
62+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")]
63+
#[rustc_clean(cfg="cfail3")]
64+
pub fn change_iteration_variable_name() {
6965
let mut _x = 0;
7066
for _a in 0..1 {
7167
_x = 1;
@@ -77,7 +73,7 @@ fn change_iteration_variable_name() {
7773

7874
// Change iteration variable pattern -------------------------------------------
7975
#[cfg(cfail1)]
80-
fn change_iteration_variable_pattern() {
76+
pub fn change_iteration_variable_pattern() {
8177
let mut _x = 0;
8278
for _i in &[0, 1, 2] {
8379
_x = 1;
@@ -86,11 +82,9 @@ fn change_iteration_variable_pattern() {
8682
}
8783

8884
#[cfg(not(cfail1))]
89-
#[rustc_clean(label="Hir", cfg="cfail2")]
90-
#[rustc_clean(label="Hir", cfg="cfail3")]
91-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
92-
#[rustc_clean(label="HirBody", cfg="cfail3")]
93-
fn change_iteration_variable_pattern() {
85+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")]
86+
#[rustc_clean(cfg="cfail3")]
87+
pub fn change_iteration_variable_pattern() {
9488
let mut _x = 0;
9589
for &_i in &[0, 1, 2] {
9690
_x = 1;
@@ -102,7 +96,7 @@ fn change_iteration_variable_pattern() {
10296

10397
// Change iterable -------------------------------------------------------------
10498
#[cfg(cfail1)]
105-
fn change_iterable() {
99+
pub fn change_iterable() {
106100
let mut _x = 0;
107101
for _ in &[0, 1, 2] {
108102
_x = 1;
@@ -111,11 +105,9 @@ fn change_iterable() {
111105
}
112106

113107
#[cfg(not(cfail1))]
114-
#[rustc_clean(label="Hir", cfg="cfail2")]
115-
#[rustc_clean(label="Hir", cfg="cfail3")]
116-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
117-
#[rustc_clean(label="HirBody", cfg="cfail3")]
118-
fn change_iterable() {
108+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")]
109+
#[rustc_clean(cfg="cfail3")]
110+
pub fn change_iterable() {
119111
let mut _x = 0;
120112
for _ in &[0, 1, 3] {
121113
_x = 1;
@@ -127,19 +119,17 @@ fn change_iterable() {
127119

128120
// Add break -------------------------------------------------------------------
129121
#[cfg(cfail1)]
130-
fn add_break() {
122+
pub fn add_break() {
131123
let mut _x = 0;
132124
for _ in 0..1 {
133125
_x = 1;
134126
}
135127
}
136128

137129
#[cfg(not(cfail1))]
138-
#[rustc_clean(label="Hir", cfg="cfail2")]
139-
#[rustc_clean(label="Hir", cfg="cfail3")]
140-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
141-
#[rustc_clean(label="HirBody", cfg="cfail3")]
142-
fn add_break() {
130+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")]
131+
#[rustc_clean(cfg="cfail3")]
132+
pub fn add_break() {
143133
let mut _x = 0;
144134
for _ in 0..1 {
145135
_x = 1;
@@ -151,7 +141,7 @@ fn add_break() {
151141

152142
// Add loop label --------------------------------------------------------------
153143
#[cfg(cfail1)]
154-
fn add_loop_label() {
144+
pub fn add_loop_label() {
155145
let mut _x = 0;
156146
for _ in 0..1 {
157147
_x = 1;
@@ -160,11 +150,9 @@ fn add_loop_label() {
160150
}
161151

162152
#[cfg(not(cfail1))]
163-
#[rustc_clean(label="Hir", cfg="cfail2")]
164-
#[rustc_clean(label="Hir", cfg="cfail3")]
165-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
166-
#[rustc_clean(label="HirBody", cfg="cfail3")]
167-
fn add_loop_label() {
153+
#[rustc_clean(cfg="cfail2", except="HirBody")]
154+
#[rustc_clean(cfg="cfail3")]
155+
pub fn add_loop_label() {
168156
let mut _x = 0;
169157
'label: for _ in 0..1 {
170158
_x = 1;
@@ -176,7 +164,7 @@ fn add_loop_label() {
176164

177165
// Add loop label to break -----------------------------------------------------
178166
#[cfg(cfail1)]
179-
fn add_loop_label_to_break() {
167+
pub fn add_loop_label_to_break() {
180168
let mut _x = 0;
181169
'label: for _ in 0..1 {
182170
_x = 1;
@@ -185,11 +173,9 @@ fn add_loop_label_to_break() {
185173
}
186174

187175
#[cfg(not(cfail1))]
188-
#[rustc_clean(label="Hir", cfg="cfail2")]
189-
#[rustc_clean(label="Hir", cfg="cfail3")]
190-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
191-
#[rustc_clean(label="HirBody", cfg="cfail3")]
192-
fn add_loop_label_to_break() {
176+
#[rustc_clean(cfg="cfail2", except="HirBody")]
177+
#[rustc_clean(cfg="cfail3")]
178+
pub fn add_loop_label_to_break() {
193179
let mut _x = 0;
194180
'label: for _ in 0..1 {
195181
_x = 1;
@@ -201,7 +187,7 @@ fn add_loop_label_to_break() {
201187

202188
// Change break label ----------------------------------------------------------
203189
#[cfg(cfail1)]
204-
fn change_break_label() {
190+
pub fn change_break_label() {
205191
let mut _x = 0;
206192
'outer: for _ in 0..1 {
207193
'inner: for _ in 0..1 {
@@ -212,11 +198,9 @@ fn change_break_label() {
212198
}
213199

214200
#[cfg(not(cfail1))]
215-
#[rustc_clean(label="Hir", cfg="cfail2")]
216-
#[rustc_clean(label="Hir", cfg="cfail3")]
217-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
218-
#[rustc_clean(label="HirBody", cfg="cfail3")]
219-
fn change_break_label() {
201+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")]
202+
#[rustc_clean(cfg="cfail3")]
203+
pub fn change_break_label() {
220204
let mut _x = 0;
221205
'outer: for _ in 0..1 {
222206
'inner: for _ in 0..1 {
@@ -230,7 +214,7 @@ fn change_break_label() {
230214

231215
// Add loop label to continue --------------------------------------------------
232216
#[cfg(cfail1)]
233-
fn add_loop_label_to_continue() {
217+
pub fn add_loop_label_to_continue() {
234218
let mut _x = 0;
235219
'label: for _ in 0..1 {
236220
_x = 1;
@@ -239,11 +223,9 @@ fn add_loop_label_to_continue() {
239223
}
240224

241225
#[cfg(not(cfail1))]
242-
#[rustc_clean(label="Hir", cfg="cfail2")]
243-
#[rustc_clean(label="Hir", cfg="cfail3")]
244-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
245-
#[rustc_clean(label="HirBody", cfg="cfail3")]
246-
fn add_loop_label_to_continue() {
226+
#[rustc_clean(cfg="cfail2", except="HirBody")]
227+
#[rustc_clean(cfg="cfail3")]
228+
pub fn add_loop_label_to_continue() {
247229
let mut _x = 0;
248230
'label: for _ in 0..1 {
249231
_x = 1;
@@ -255,7 +237,7 @@ fn add_loop_label_to_continue() {
255237

256238
// Change continue label ----------------------------------------------------------
257239
#[cfg(cfail1)]
258-
fn change_continue_label() {
240+
pub fn change_continue_label() {
259241
let mut _x = 0;
260242
'outer: for _ in 0..1 {
261243
'inner: for _ in 0..1 {
@@ -266,11 +248,9 @@ fn change_continue_label() {
266248
}
267249

268250
#[cfg(not(cfail1))]
269-
#[rustc_clean(label="Hir", cfg="cfail2")]
270-
#[rustc_clean(label="Hir", cfg="cfail3")]
271-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
272-
#[rustc_clean(label="HirBody", cfg="cfail3")]
273-
fn change_continue_label() {
251+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")]
252+
#[rustc_clean(cfg="cfail3")]
253+
pub fn change_continue_label() {
274254
let mut _x = 0;
275255
'outer: for _ in 0..1 {
276256
'inner: for _ in 0..1 {
@@ -284,7 +264,7 @@ fn change_continue_label() {
284264

285265
// Change continue to break ----------------------------------------------------
286266
#[cfg(cfail1)]
287-
fn change_continue_to_break() {
267+
pub fn change_continue_to_break() {
288268
let mut _x = 0;
289269
for _ in 0..1 {
290270
_x = 1;
@@ -293,11 +273,9 @@ fn change_continue_to_break() {
293273
}
294274

295275
#[cfg(not(cfail1))]
296-
#[rustc_clean(label="Hir", cfg="cfail2")]
297-
#[rustc_clean(label="Hir", cfg="cfail3")]
298-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
299-
#[rustc_clean(label="HirBody", cfg="cfail3")]
300-
fn change_continue_to_break() {
276+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")]
277+
#[rustc_clean(cfg="cfail3")]
278+
pub fn change_continue_to_break() {
301279
let mut _x = 0;
302280
for _ in 0..1 {
303281
_x = 1;

0 commit comments

Comments
 (0)