Skip to content

Commit 3f48cbb

Browse files
committed
Update loop expression fingerprint hash tests
1 parent 820ed30 commit 3f48cbb

File tree

1 file changed

+32
-48
lines changed

1 file changed

+32
-48
lines changed

src/test/incremental/hashes/loop_expressions.rs

Lines changed: 32 additions & 48 deletions
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
loop {
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
loop {
4644
_x = 2;
@@ -52,19 +50,17 @@ fn change_loop_body() {
5250

5351
// Add break -------------------------------------------------------------------
5452
#[cfg(cfail1)]
55-
fn add_break() {
53+
pub fn add_break() {
5654
let mut _x = 0;
5755
loop {
5856
_x = 1;
5957
}
6058
}
6159

6260
#[cfg(not(cfail1))]
63-
#[rustc_clean(label="Hir", cfg="cfail2")]
64-
#[rustc_clean(label="Hir", cfg="cfail3")]
65-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
66-
#[rustc_clean(label="HirBody", cfg="cfail3")]
67-
fn add_break() {
61+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")]
62+
#[rustc_clean(cfg="cfail3")]
63+
pub fn add_break() {
6864
let mut _x = 0;
6965
loop {
7066
_x = 1;
@@ -76,7 +72,7 @@ fn add_break() {
7672

7773
// Add loop label --------------------------------------------------------------
7874
#[cfg(cfail1)]
79-
fn add_loop_label() {
75+
pub fn add_loop_label() {
8076
let mut _x = 0;
8177
loop {
8278
_x = 1;
@@ -85,11 +81,9 @@ fn add_loop_label() {
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_loop_label() {
84+
#[rustc_clean(cfg="cfail2", except="HirBody")]
85+
#[rustc_clean(cfg="cfail3")]
86+
pub fn add_loop_label() {
9387
let mut _x = 0;
9488
'label: loop {
9589
_x = 1;
@@ -101,7 +95,7 @@ fn add_loop_label() {
10195

10296
// Add loop label to break -----------------------------------------------------
10397
#[cfg(cfail1)]
104-
fn add_loop_label_to_break() {
98+
pub fn add_loop_label_to_break() {
10599
let mut _x = 0;
106100
'label: loop {
107101
_x = 1;
@@ -110,11 +104,9 @@ fn add_loop_label_to_break() {
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_to_break() {
107+
#[rustc_clean(cfg="cfail2", except="HirBody")]
108+
#[rustc_clean(cfg="cfail3")]
109+
pub fn add_loop_label_to_break() {
118110
let mut _x = 0;
119111
'label: loop {
120112
_x = 1;
@@ -126,7 +118,7 @@ fn add_loop_label_to_break() {
126118

127119
// Change break label ----------------------------------------------------------
128120
#[cfg(cfail1)]
129-
fn change_break_label() {
121+
pub fn change_break_label() {
130122
let mut _x = 0;
131123
'outer: loop {
132124
'inner: loop {
@@ -137,11 +129,9 @@ fn change_break_label() {
137129
}
138130

139131
#[cfg(not(cfail1))]
140-
#[rustc_clean(label="Hir", cfg="cfail2")]
141-
#[rustc_clean(label="Hir", cfg="cfail3")]
142-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
143-
#[rustc_clean(label="HirBody", cfg="cfail3")]
144-
fn change_break_label() {
132+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")]
133+
#[rustc_clean(cfg="cfail3")]
134+
pub fn change_break_label() {
145135
let mut _x = 0;
146136
'outer: loop {
147137
'inner: loop {
@@ -155,7 +145,7 @@ fn change_break_label() {
155145

156146
// Add loop label to continue --------------------------------------------------
157147
#[cfg(cfail1)]
158-
fn add_loop_label_to_continue() {
148+
pub fn add_loop_label_to_continue() {
159149
let mut _x = 0;
160150
'label: loop {
161151
_x = 1;
@@ -164,11 +154,9 @@ fn add_loop_label_to_continue() {
164154
}
165155

166156
#[cfg(not(cfail1))]
167-
#[rustc_clean(label="Hir", cfg="cfail2")]
168-
#[rustc_clean(label="Hir", cfg="cfail3")]
169-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
170-
#[rustc_clean(label="HirBody", cfg="cfail3")]
171-
fn add_loop_label_to_continue() {
157+
#[rustc_clean(cfg="cfail2", except="HirBody")]
158+
#[rustc_clean(cfg="cfail3")]
159+
pub fn add_loop_label_to_continue() {
172160
let mut _x = 0;
173161
'label: loop {
174162
_x = 1;
@@ -180,7 +168,7 @@ fn add_loop_label_to_continue() {
180168

181169
// Change continue label ----------------------------------------------------------
182170
#[cfg(cfail1)]
183-
fn change_continue_label() {
171+
pub fn change_continue_label() {
184172
let mut _x = 0;
185173
'outer: loop {
186174
'inner: loop {
@@ -191,11 +179,9 @@ fn change_continue_label() {
191179
}
192180

193181
#[cfg(not(cfail1))]
194-
#[rustc_clean(label="Hir", cfg="cfail2")]
195-
#[rustc_clean(label="Hir", cfg="cfail3")]
196-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
197-
#[rustc_clean(label="HirBody", cfg="cfail3")]
198-
fn change_continue_label() {
182+
#[rustc_clean(cfg="cfail2", except="HirBody, TypeckTables")]
183+
#[rustc_clean(cfg="cfail3")]
184+
pub fn change_continue_label() {
199185
let mut _x = 0;
200186
'outer: loop {
201187
'inner: loop {
@@ -209,7 +195,7 @@ fn change_continue_label() {
209195

210196
// Change continue to break ----------------------------------------------------
211197
#[cfg(cfail1)]
212-
fn change_continue_to_break() {
198+
pub fn change_continue_to_break() {
213199
let mut _x = 0;
214200
loop {
215201
_x = 1;
@@ -218,11 +204,9 @@ fn change_continue_to_break() {
218204
}
219205

220206
#[cfg(not(cfail1))]
221-
#[rustc_clean(label="Hir", cfg="cfail2")]
222-
#[rustc_clean(label="Hir", cfg="cfail3")]
223-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
224-
#[rustc_clean(label="HirBody", cfg="cfail3")]
225-
fn change_continue_to_break() {
207+
#[rustc_clean(cfg="cfail2", except="HirBody, MirValidated, MirOptimized, TypeckTables")]
208+
#[rustc_clean(cfg="cfail3")]
209+
pub fn change_continue_to_break() {
226210
let mut _x = 0;
227211
loop {
228212
_x = 1;

0 commit comments

Comments
 (0)