Skip to content

Commit 104ebd2

Browse files
committed
Update 'while loop' fingerprint hash tests
1 parent b8714c6 commit 104ebd2

File tree

1 file changed

+36
-54
lines changed

1 file changed

+36
-54
lines changed

src/test/incremental/hashes/while_loops.rs

+36-54
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
while true {
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
while true {
4644
_x = 2;
@@ -52,7 +50,7 @@ fn change_loop_body() {
5250

5351
// Change loop body ------------------------------------------------------------
5452
#[cfg(cfail1)]
55-
fn change_loop_condition() {
53+
pub fn change_loop_condition() {
5654
let mut _x = 0;
5755
while true {
5856
_x = 1;
@@ -61,11 +59,9 @@ fn change_loop_condition() {
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_loop_condition() {
62+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")]
63+
#[rustc_clean(cfg="cfail3")]
64+
pub fn change_loop_condition() {
6965
let mut _x = 0;
7066
while false {
7167
_x = 1;
@@ -77,19 +73,17 @@ fn change_loop_condition() {
7773

7874
// Add break -------------------------------------------------------------------
7975
#[cfg(cfail1)]
80-
fn add_break() {
76+
pub fn add_break() {
8177
let mut _x = 0;
8278
while true {
8379
_x = 1;
8480
}
8581
}
8682

8783
#[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_break() {
84+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")]
85+
#[rustc_clean(cfg="cfail3")]
86+
pub fn add_break() {
9387
let mut _x = 0;
9488
while true {
9589
_x = 1;
@@ -101,7 +95,7 @@ fn add_break() {
10195

10296
// Add loop label --------------------------------------------------------------
10397
#[cfg(cfail1)]
104-
fn add_loop_label() {
98+
pub fn add_loop_label() {
10599
let mut _x = 0;
106100
while true {
107101
_x = 1;
@@ -110,11 +104,9 @@ fn add_loop_label() {
110104
}
111105

112106
#[cfg(not(cfail1))]
113-
#[rustc_clean(label="Hir", cfg="cfail2")]
114-
#[rustc_clean(label="Hir", cfg="cfail3")]
115-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
116-
#[rustc_clean(label="HirBody", cfg="cfail3")]
117-
fn add_loop_label() {
107+
#[rustc_clean(cfg="cfail2", except="HirBody")]
108+
#[rustc_clean(cfg="cfail3")]
109+
pub fn add_loop_label() {
118110
let mut _x = 0;
119111
'label: while true {
120112
_x = 1;
@@ -126,7 +118,7 @@ fn add_loop_label() {
126118

127119
// Add loop label to break -----------------------------------------------------
128120
#[cfg(cfail1)]
129-
fn add_loop_label_to_break() {
121+
pub fn add_loop_label_to_break() {
130122
let mut _x = 0;
131123
'label: while true {
132124
_x = 1;
@@ -135,11 +127,9 @@ fn add_loop_label_to_break() {
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_loop_label_to_break() {
130+
#[rustc_clean(cfg="cfail2", except="HirBody")]
131+
#[rustc_clean(cfg="cfail3")]
132+
pub fn add_loop_label_to_break() {
143133
let mut _x = 0;
144134
'label: while true {
145135
_x = 1;
@@ -151,7 +141,7 @@ fn add_loop_label_to_break() {
151141

152142
// Change break label ----------------------------------------------------------
153143
#[cfg(cfail1)]
154-
fn change_break_label() {
144+
pub fn change_break_label() {
155145
let mut _x = 0;
156146
'outer: while true {
157147
'inner: while true {
@@ -162,11 +152,9 @@ fn change_break_label() {
162152
}
163153

164154
#[cfg(not(cfail1))]
165-
#[rustc_clean(label="Hir", cfg="cfail2")]
166-
#[rustc_clean(label="Hir", cfg="cfail3")]
167-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
168-
#[rustc_clean(label="HirBody", cfg="cfail3")]
169-
fn change_break_label() {
155+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")]
156+
#[rustc_clean(cfg="cfail3")]
157+
pub fn change_break_label() {
170158
let mut _x = 0;
171159
'outer: while true {
172160
'inner: while true {
@@ -180,7 +168,7 @@ fn change_break_label() {
180168

181169
// Add loop label to continue --------------------------------------------------
182170
#[cfg(cfail1)]
183-
fn add_loop_label_to_continue() {
171+
pub fn add_loop_label_to_continue() {
184172
let mut _x = 0;
185173
'label: while true {
186174
_x = 1;
@@ -189,11 +177,9 @@ fn add_loop_label_to_continue() {
189177
}
190178

191179
#[cfg(not(cfail1))]
192-
#[rustc_clean(label="Hir", cfg="cfail2")]
193-
#[rustc_clean(label="Hir", cfg="cfail3")]
194-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
195-
#[rustc_clean(label="HirBody", cfg="cfail3")]
196-
fn add_loop_label_to_continue() {
180+
#[rustc_clean(cfg="cfail2", except="HirBody")]
181+
#[rustc_clean(cfg="cfail3")]
182+
pub fn add_loop_label_to_continue() {
197183
let mut _x = 0;
198184
'label: while true {
199185
_x = 1;
@@ -205,7 +191,7 @@ fn add_loop_label_to_continue() {
205191

206192
// Change continue label ----------------------------------------------------------
207193
#[cfg(cfail1)]
208-
fn change_continue_label() {
194+
pub fn change_continue_label() {
209195
let mut _x = 0;
210196
'outer: while true {
211197
'inner: while true {
@@ -216,11 +202,9 @@ fn change_continue_label() {
216202
}
217203

218204
#[cfg(not(cfail1))]
219-
#[rustc_clean(label="Hir", cfg="cfail2")]
220-
#[rustc_clean(label="Hir", cfg="cfail3")]
221-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
222-
#[rustc_clean(label="HirBody", cfg="cfail3")]
223-
fn change_continue_label() {
205+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated")]
206+
#[rustc_clean(cfg="cfail3")]
207+
pub fn change_continue_label() {
224208
let mut _x = 0;
225209
'outer: while true {
226210
'inner: while true {
@@ -234,7 +218,7 @@ fn change_continue_label() {
234218

235219
// Change continue to break ----------------------------------------------------
236220
#[cfg(cfail1)]
237-
fn change_continue_to_break() {
221+
pub fn change_continue_to_break() {
238222
let mut _x = 0;
239223
while true {
240224
_x = 1;
@@ -243,11 +227,9 @@ fn change_continue_to_break() {
243227
}
244228

245229
#[cfg(not(cfail1))]
246-
#[rustc_clean(label="Hir", cfg="cfail2")]
247-
#[rustc_clean(label="Hir", cfg="cfail3")]
248-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
249-
#[rustc_clean(label="HirBody", cfg="cfail3")]
250-
fn change_continue_to_break() {
230+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized")]
231+
#[rustc_clean(cfg="cfail3")]
232+
pub fn change_continue_to_break() {
251233
let mut _x = 0;
252234
while true {
253235
_x = 1;

0 commit comments

Comments
 (0)