Skip to content

Commit 7ebccbb

Browse files
incr.comp.: Update test cases after metadata hashing removal.
1 parent c60b0e4 commit 7ebccbb

29 files changed

+5
-1117
lines changed

src/test/incremental/hashes/call_expressions.rs

+4-18
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ pub fn change_callee_function() {
3838
#[cfg(not(cfail1))]
3939
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized,TypeckTables")]
4040
#[rustc_clean(cfg="cfail3")]
41-
#[rustc_metadata_clean(cfg="cfail2")]
42-
#[rustc_metadata_clean(cfg="cfail3")]
4341
pub fn change_callee_function() {
4442
callee2(1, 2)
4543
}
@@ -55,8 +53,6 @@ pub fn change_argument_function() {
5553
#[cfg(not(cfail1))]
5654
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized")]
5755
#[rustc_clean(cfg="cfail3")]
58-
#[rustc_metadata_clean(cfg="cfail2")]
59-
#[rustc_metadata_clean(cfg="cfail3")]
6056
pub fn change_argument_function() {
6157
callee1(1, 3)
6258
}
@@ -74,8 +70,8 @@ mod change_callee_indirectly_function {
7470
#[rustc_clean(label="Hir", cfg="cfail3")]
7571
#[rustc_dirty(label="HirBody", cfg="cfail2")]
7672
#[rustc_clean(label="HirBody", cfg="cfail3")]
77-
#[rustc_metadata_clean(cfg="cfail2")]
78-
#[rustc_metadata_clean(cfg="cfail3")]
73+
74+
7975
pub fn change_callee_indirectly_function() {
8076
callee(1, 2)
8177
}
@@ -98,8 +94,6 @@ pub fn change_callee_method() {
9894
#[cfg(not(cfail1))]
9995
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized,TypeckTables")]
10096
#[rustc_clean(cfg="cfail3")]
101-
#[rustc_metadata_clean(cfg="cfail2")]
102-
#[rustc_metadata_clean(cfg="cfail3")]
10397
pub fn change_callee_method() {
10498
let s = Struct;
10599
s.method2('x', true);
@@ -117,8 +111,6 @@ pub fn change_argument_method() {
117111
#[cfg(not(cfail1))]
118112
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized")]
119113
#[rustc_clean(cfg="cfail3")]
120-
#[rustc_metadata_clean(cfg="cfail2")]
121-
#[rustc_metadata_clean(cfg="cfail3")]
122114
pub fn change_argument_method() {
123115
let s = Struct;
124116
s.method1('y', true);
@@ -136,8 +128,6 @@ pub fn change_ufcs_callee_method() {
136128
#[cfg(not(cfail1))]
137129
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized,TypeckTables")]
138130
#[rustc_clean(cfg="cfail3")]
139-
#[rustc_metadata_clean(cfg="cfail2")]
140-
#[rustc_metadata_clean(cfg="cfail3")]
141131
pub fn change_ufcs_callee_method() {
142132
let s = Struct;
143133
Struct::method2(&s, 'x', true);
@@ -155,8 +145,6 @@ pub fn change_argument_method_ufcs() {
155145
#[cfg(not(cfail1))]
156146
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized")]
157147
#[rustc_clean(cfg="cfail3")]
158-
#[rustc_metadata_clean(cfg="cfail2")]
159-
#[rustc_metadata_clean(cfg="cfail3")]
160148
pub fn change_argument_method_ufcs() {
161149
let s = Struct;
162150
Struct::method1(&s, 'x', false);
@@ -174,8 +162,6 @@ pub fn change_to_ufcs() {
174162
#[cfg(not(cfail1))]
175163
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized,TypeckTables")]
176164
#[rustc_clean(cfg="cfail3")]
177-
#[rustc_metadata_clean(cfg="cfail2")]
178-
#[rustc_metadata_clean(cfg="cfail3")]
179165
// One might think this would be expanded in the HirBody/Mir, but it actually
180166
// results in slightly different Hir/Mir.
181167
pub fn change_to_ufcs() {
@@ -198,8 +184,8 @@ pub mod change_ufcs_callee_indirectly {
198184

199185
#[rustc_clean(cfg="cfail2", except="HirBody,MirValidated,MirOptimized,TypeckTables")]
200186
#[rustc_clean(cfg="cfail3")]
201-
#[rustc_metadata_clean(cfg="cfail2")]
202-
#[rustc_metadata_clean(cfg="cfail3")]
187+
188+
203189
pub fn change_ufcs_callee_indirectly() {
204190
let s = Struct;
205191
Struct::method1(&s, 'q', false)

src/test/incremental/hashes/closure_expressions.rs

-12
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ fn change_closure_body() {
3636
#[rustc_clean(label="Hir", cfg="cfail3")]
3737
#[rustc_dirty(label="HirBody", cfg="cfail2")]
3838
#[rustc_clean(label="HirBody", cfg="cfail3")]
39-
#[rustc_metadata_clean(cfg="cfail2")]
40-
#[rustc_metadata_clean(cfg="cfail3")]
4139
fn change_closure_body() {
4240
let _ = || 3u32;
4341
}
@@ -56,8 +54,6 @@ fn add_parameter() {
5654
#[rustc_clean(label="Hir", cfg="cfail3")]
5755
#[rustc_dirty(label="HirBody", cfg="cfail2")]
5856
#[rustc_clean(label="HirBody", cfg="cfail3")]
59-
#[rustc_metadata_clean(cfg="cfail2")]
60-
#[rustc_metadata_clean(cfg="cfail3")]
6157
fn add_parameter() {
6258
let x = 0u32;
6359
let _ = |x: u32| x + 1;
@@ -76,8 +72,6 @@ fn change_parameter_pattern() {
7672
#[rustc_clean(label="Hir", cfg="cfail3")]
7773
#[rustc_dirty(label="HirBody", cfg="cfail2")]
7874
#[rustc_clean(label="HirBody", cfg="cfail3")]
79-
#[rustc_metadata_clean(cfg="cfail2")]
80-
#[rustc_metadata_clean(cfg="cfail3")]
8175
fn change_parameter_pattern() {
8276
let _ = |&x: &u32| x;
8377
}
@@ -95,8 +89,6 @@ fn add_move() {
9589
#[rustc_clean(label="Hir", cfg="cfail3")]
9690
#[rustc_dirty(label="HirBody", cfg="cfail2")]
9791
#[rustc_clean(label="HirBody", cfg="cfail3")]
98-
#[rustc_metadata_clean(cfg="cfail2")]
99-
#[rustc_metadata_clean(cfg="cfail3")]
10092
fn add_move() {
10193
let _ = move || 1;
10294
}
@@ -115,8 +107,6 @@ fn add_type_ascription_to_parameter() {
115107
#[rustc_clean(label="Hir", cfg="cfail3")]
116108
#[rustc_dirty(label="HirBody", cfg="cfail2")]
117109
#[rustc_clean(label="HirBody", cfg="cfail3")]
118-
#[rustc_metadata_clean(cfg="cfail2")]
119-
#[rustc_metadata_clean(cfg="cfail3")]
120110
fn add_type_ascription_to_parameter() {
121111
let closure = |x: u32| x + 1u32;
122112
let _: u32 = closure(1);
@@ -136,8 +126,6 @@ fn change_parameter_type() {
136126
#[rustc_clean(label="Hir", cfg="cfail3")]
137127
#[rustc_dirty(label="HirBody", cfg="cfail2")]
138128
#[rustc_clean(label="HirBody", cfg="cfail3")]
139-
#[rustc_metadata_clean(cfg="cfail2")]
140-
#[rustc_metadata_clean(cfg="cfail3")]
141129
fn change_parameter_type() {
142130
let closure = |x: u16| (x as u64) + 1;
143131
let _ = closure(1);

src/test/incremental/hashes/consts.rs

-17
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ const CONST_VISIBILITY: u8 = 0;
3232
#[cfg(not(cfail1))]
3333
#[rustc_clean(cfg="cfail2", except="Hir,HirBody")]
3434
#[rustc_clean(cfg="cfail3")]
35-
#[rustc_metadata_dirty(cfg="cfail2")]
36-
#[rustc_metadata_clean(cfg="cfail3")]
3735
pub const CONST_VISIBILITY: u8 = 0;
3836

3937

@@ -44,8 +42,6 @@ const CONST_CHANGE_TYPE_1: i32 = 0;
4442
#[cfg(not(cfail1))]
4543
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
4644
#[rustc_clean(cfg="cfail3")]
47-
#[rustc_metadata_dirty(cfg="cfail2")]
48-
#[rustc_metadata_clean(cfg="cfail3")]
4945
const CONST_CHANGE_TYPE_1: u32 = 0;
5046

5147

@@ -56,15 +52,12 @@ const CONST_CHANGE_TYPE_2: Option<u32> = None;
5652
#[cfg(not(cfail1))]
5753
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
5854
#[rustc_clean(cfg="cfail3")]
59-
#[rustc_metadata_dirty(cfg="cfail2")]
60-
#[rustc_metadata_clean(cfg="cfail3")]
6155
const CONST_CHANGE_TYPE_2: Option<u64> = None;
6256

6357

6458
// Change value between simple literals ---------------------------------------
6559
#[rustc_clean(cfg="cfail2", except="HirBody")]
6660
#[rustc_clean(cfg="cfail3")]
67-
#[rustc_metadata_clean(cfg="cfail3")]
6861
const CONST_CHANGE_VALUE_1: i16 = {
6962
#[cfg(cfail1)]
7063
{ 1 }
@@ -77,8 +70,6 @@ const CONST_CHANGE_VALUE_1: i16 = {
7770
// Change value between expressions -------------------------------------------
7871
#[rustc_clean(cfg="cfail2", except="HirBody")]
7972
#[rustc_clean(cfg="cfail3")]
80-
#[rustc_metadata_dirty(cfg="cfail2")]
81-
#[rustc_metadata_clean(cfg="cfail3")]
8273
const CONST_CHANGE_VALUE_2: i16 = {
8374
#[cfg(cfail1)]
8475
{ 1 + 1 }
@@ -89,8 +80,6 @@ const CONST_CHANGE_VALUE_2: i16 = {
8980

9081
#[rustc_clean(cfg="cfail2", except="HirBody")]
9182
#[rustc_clean(cfg="cfail3")]
92-
#[rustc_metadata_dirty(cfg="cfail2")]
93-
#[rustc_metadata_clean(cfg="cfail3")]
9483
const CONST_CHANGE_VALUE_3: i16 = {
9584
#[cfg(cfail1)]
9685
{ 2 + 3 }
@@ -101,8 +90,6 @@ const CONST_CHANGE_VALUE_3: i16 = {
10190

10291
#[rustc_clean(cfg="cfail2", except="HirBody")]
10392
#[rustc_clean(cfg="cfail3")]
104-
#[rustc_metadata_dirty(cfg="cfail2")]
105-
#[rustc_metadata_clean(cfg="cfail3")]
10693
const CONST_CHANGE_VALUE_4: i16 = {
10794
#[cfg(cfail1)]
10895
{ 1 + 2 * 3 }
@@ -125,13 +112,9 @@ mod const_change_type_indirectly {
125112

126113
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
127114
#[rustc_clean(cfg="cfail3")]
128-
#[rustc_metadata_dirty(cfg="cfail2")]
129-
#[rustc_metadata_clean(cfg="cfail3")]
130115
const CONST_CHANGE_TYPE_INDIRECTLY_1: Type = Type;
131116

132117
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,TypeOfItem")]
133118
#[rustc_clean(cfg="cfail3")]
134-
#[rustc_metadata_dirty(cfg="cfail2")]
135-
#[rustc_metadata_clean(cfg="cfail3")]
136119
const CONST_CHANGE_TYPE_INDIRECTLY_2: Option<Type> = None;
137120
}

src/test/incremental/hashes/enum_constructors.rs

-29
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ pub fn change_field_value_struct_like() -> Enum {
4747
#[cfg(not(cfail1))]
4848
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
4949
#[rustc_clean(cfg="cfail3")]
50-
#[rustc_metadata_clean(cfg="cfail2")]
51-
#[rustc_metadata_clean(cfg="cfail3")]
5250
pub fn change_field_value_struct_like() -> Enum {
5351
Enum::Struct {
5452
x: 0,
@@ -72,8 +70,6 @@ pub fn change_field_order_struct_like() -> Enum {
7270
#[cfg(not(cfail1))]
7371
#[rustc_clean(cfg="cfail2", except="HirBody,TypeckTables")]
7472
#[rustc_clean(cfg="cfail3")]
75-
#[rustc_metadata_clean(cfg="cfail2")]
76-
#[rustc_metadata_clean(cfg="cfail3")]
7773
// FIXME(michaelwoerister):Interesting. I would have thought that that changes the MIR. And it
7874
// would if it were not all constants
7975
pub fn change_field_order_struct_like() -> Enum {
@@ -113,8 +109,6 @@ pub fn change_constructor_path_struct_like() {
113109
#[cfg(not(cfail1))]
114110
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated,TypeckTables")]
115111
#[rustc_clean(cfg="cfail3")]
116-
#[rustc_metadata_clean(cfg="cfail2")]
117-
#[rustc_metadata_clean(cfg="cfail3")]
118112
pub fn change_constructor_path_struct_like() {
119113
let _ = Enum2::Struct {
120114
x: 0,
@@ -138,8 +132,6 @@ pub fn change_constructor_variant_struct_like() {
138132
#[cfg(not(cfail1))]
139133
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
140134
#[rustc_clean(cfg="cfail3")]
141-
#[rustc_metadata_clean(cfg="cfail2")]
142-
#[rustc_metadata_clean(cfg="cfail3")]
143135
pub fn change_constructor_variant_struct_like() {
144136
let _ = Enum2::Struct2 {
145137
x: 0,
@@ -162,8 +154,6 @@ pub mod change_constructor_path_indirectly_struct_like {
162154
TypeckTables"
163155
)]
164156
#[rustc_clean(cfg="cfail3")]
165-
#[rustc_metadata_dirty(cfg="cfail2")]
166-
#[rustc_metadata_clean(cfg="cfail3")]
167157
pub fn function() -> TheEnum {
168158
TheEnum::Struct {
169159
x: 0,
@@ -184,8 +174,6 @@ pub mod change_constructor_variant_indirectly_struct_like {
184174

185175
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
186176
#[rustc_clean(cfg="cfail3")]
187-
#[rustc_metadata_clean(cfg="cfail2")]
188-
#[rustc_metadata_clean(cfg="cfail3")]
189177
pub fn function() -> Enum2 {
190178
Variant {
191179
x: 0,
@@ -205,8 +193,6 @@ pub fn change_field_value_tuple_like() -> Enum {
205193
#[cfg(not(cfail1))]
206194
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
207195
#[rustc_clean(cfg="cfail3")]
208-
#[rustc_metadata_clean(cfg="cfail2")]
209-
#[rustc_metadata_clean(cfg="cfail3")]
210196
pub fn change_field_value_tuple_like() -> Enum {
211197
Enum::Tuple(0, 1, 3)
212198
}
@@ -225,8 +211,6 @@ pub fn change_constructor_path_tuple_like() {
225211
except="HirBody,MirOptimized,MirValidated,TypeckTables"
226212
)]
227213
#[rustc_clean(cfg="cfail3")]
228-
#[rustc_metadata_clean(cfg="cfail2")]
229-
#[rustc_metadata_clean(cfg="cfail3")]
230214
pub fn change_constructor_path_tuple_like() {
231215
let _ = Enum2::Tuple(0, 1, 2);
232216
}
@@ -245,8 +229,6 @@ pub fn change_constructor_variant_tuple_like() {
245229
except="HirBody,MirOptimized,MirValidated,TypeckTables"
246230
)]
247231
#[rustc_clean(cfg="cfail3")]
248-
#[rustc_metadata_clean(cfg="cfail2")]
249-
#[rustc_metadata_clean(cfg="cfail3")]
250232
pub fn change_constructor_variant_tuple_like() {
251233
let _ = Enum2::Tuple2(0, 1, 2);
252234
}
@@ -265,8 +247,6 @@ pub mod change_constructor_path_indirectly_tuple_like {
265247
TypeckTables"
266248
)]
267249
#[rustc_clean(cfg="cfail3")]
268-
#[rustc_metadata_dirty(cfg="cfail2")]
269-
#[rustc_metadata_clean(cfg="cfail3")]
270250
pub fn function() -> TheEnum {
271251
TheEnum::Tuple(0, 1, 2)
272252
}
@@ -284,8 +264,6 @@ pub mod change_constructor_variant_indirectly_tuple_like {
284264

285265
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated,TypeckTables")]
286266
#[rustc_clean(cfg="cfail3")]
287-
#[rustc_metadata_clean(cfg="cfail2")]
288-
#[rustc_metadata_clean(cfg="cfail3")]
289267
pub fn function() -> Enum2 {
290268
Variant(0, 1, 2)
291269
}
@@ -313,7 +291,6 @@ pub fn change_constructor_path_c_like() {
313291
#[cfg(not(cfail1))]
314292
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated,TypeckTables")]
315293
#[rustc_clean(cfg="cfail3")]
316-
#[rustc_metadata_clean(cfg="cfail3")]
317294
pub fn change_constructor_path_c_like() {
318295
let _ = Clike2::B;
319296
}
@@ -329,8 +306,6 @@ pub fn change_constructor_variant_c_like() {
329306
#[cfg(not(cfail1))]
330307
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
331308
#[rustc_clean(cfg="cfail3")]
332-
#[rustc_metadata_clean(cfg="cfail2")]
333-
#[rustc_metadata_clean(cfg="cfail3")]
334309
pub fn change_constructor_variant_c_like() {
335310
let _ = Clike::C;
336311
}
@@ -349,8 +324,6 @@ pub mod change_constructor_path_indirectly_c_like {
349324
TypeckTables"
350325
)]
351326
#[rustc_clean(cfg="cfail3")]
352-
#[rustc_metadata_dirty(cfg="cfail2")]
353-
#[rustc_metadata_clean(cfg="cfail3")]
354327
pub fn function() -> TheEnum {
355328
TheEnum::B
356329
}
@@ -368,8 +341,6 @@ pub mod change_constructor_variant_indirectly_c_like {
368341

369342
#[rustc_clean(cfg="cfail2", except="HirBody,MirOptimized,MirValidated")]
370343
#[rustc_clean(cfg="cfail3")]
371-
#[rustc_metadata_clean(cfg="cfail2")]
372-
#[rustc_metadata_clean(cfg="cfail3")]
373344
pub fn function() -> Clike {
374345
Variant
375346
}

0 commit comments

Comments
 (0)