Skip to content

Commit c0b60c4

Browse files
committed
Replace HirBody with hir_owner_items in tests
1 parent 739a1ef commit c0b60c4

33 files changed

+356
-355
lines changed

src/librustc_incremental/persist/dirty_clean.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ const BASE_FN: &[&str] = &[
5353

5454
/// DepNodes for Hir, which is pretty much everything
5555
const BASE_HIR: &[&str] = &[
56-
// Hir and HirBody should be computed for all nodes
57-
"Hir", "HirBody",
56+
// hir_owner and hir_owner_items should be computed for all nodes
57+
label_strs::hir_owner,
58+
label_strs::hir_owner_items,
5859
];
5960

6061
/// `impl` implementation of struct/trait

src/librustc_metadata/rmeta/decoder/cstore_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ provide! { <'tcx> tcx, def_id, other, cdata,
142142
cdata.get_deprecation(def_id.index).map(DeprecationEntry::external)
143143
}
144144
item_attrs => { cdata.get_item_attrs(def_id.index, tcx.sess) }
145-
// FIXME(#38501) We've skipped a `read` on the `HirBody` of
145+
// FIXME(#38501) We've skipped a `read` on the `hir_owner_items` of
146146
// a `fn` when encoding, so the dep-tracking wouldn't work.
147147
// This is only used by rustdoc anyway, which shouldn't have
148148
// incremental recompilation ever enabled.

src/test/incremental/hashes/call_expressions.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn change_callee_function() {
2525
}
2626

2727
#[cfg(not(cfail1))]
28-
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir,typeck_tables_of")]
28+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,mir_built,optimized_mir,typeck_tables_of")]
2929
#[rustc_clean(cfg="cfail3")]
3030
pub fn change_callee_function() {
3131
callee2(1, 2)
@@ -40,7 +40,7 @@ pub fn change_argument_function() {
4040
}
4141

4242
#[cfg(not(cfail1))]
43-
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
43+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,mir_built,optimized_mir")]
4444
#[rustc_clean(cfg="cfail3")]
4545
pub fn change_argument_function() {
4646
callee1(1, 3)
@@ -57,8 +57,8 @@ mod change_callee_indirectly_function {
5757

5858
#[rustc_clean(label="Hir", cfg="cfail2")]
5959
#[rustc_clean(label="Hir", cfg="cfail3")]
60-
#[rustc_dirty(label="HirBody", cfg="cfail2")]
61-
#[rustc_clean(label="HirBody", cfg="cfail3")]
60+
#[rustc_dirty(label="hir_owner_items", cfg="cfail2")]
61+
#[rustc_clean(label="hir_owner_items", cfg="cfail3")]
6262

6363

6464
pub fn change_callee_indirectly_function() {
@@ -81,7 +81,7 @@ pub fn change_callee_method() {
8181
}
8282

8383
#[cfg(not(cfail1))]
84-
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir,typeck_tables_of")]
84+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,mir_built,optimized_mir,typeck_tables_of")]
8585
#[rustc_clean(cfg="cfail3")]
8686
pub fn change_callee_method() {
8787
let s = Struct;
@@ -98,7 +98,7 @@ pub fn change_argument_method() {
9898
}
9999

100100
#[cfg(not(cfail1))]
101-
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
101+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,mir_built,optimized_mir")]
102102
#[rustc_clean(cfg="cfail3")]
103103
pub fn change_argument_method() {
104104
let s = Struct;
@@ -115,7 +115,7 @@ pub fn change_ufcs_callee_method() {
115115
}
116116

117117
#[cfg(not(cfail1))]
118-
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir,typeck_tables_of")]
118+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,mir_built,optimized_mir,typeck_tables_of")]
119119
#[rustc_clean(cfg="cfail3")]
120120
pub fn change_ufcs_callee_method() {
121121
let s = Struct;
@@ -132,7 +132,7 @@ pub fn change_argument_method_ufcs() {
132132
}
133133

134134
#[cfg(not(cfail1))]
135-
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
135+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,mir_built,optimized_mir")]
136136
#[rustc_clean(cfg="cfail3")]
137137
pub fn change_argument_method_ufcs() {
138138
let s = Struct;
@@ -149,9 +149,9 @@ pub fn change_to_ufcs() {
149149
}
150150

151151
#[cfg(not(cfail1))]
152-
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir,typeck_tables_of")]
152+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,mir_built,optimized_mir,typeck_tables_of")]
153153
#[rustc_clean(cfg="cfail3")]
154-
// One might think this would be expanded in the HirBody/Mir, but it actually
154+
// One might think this would be expanded in the hir_owner_items/Mir, but it actually
155155
// results in slightly different Hir/Mir.
156156
pub fn change_to_ufcs() {
157157
let s = Struct;
@@ -171,7 +171,7 @@ pub mod change_ufcs_callee_indirectly {
171171
#[cfg(not(cfail1))]
172172
use super::Struct2 as Struct;
173173

174-
#[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir,typeck_tables_of")]
174+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,mir_built,optimized_mir,typeck_tables_of")]
175175
#[rustc_clean(cfg="cfail3")]
176176

177177

src/test/incremental/hashes/closure_expressions.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub fn change_closure_body() {
2121
}
2222

2323
#[cfg(not(cfail1))]
24-
#[rustc_clean(cfg="cfail2", except="HirBody")]
24+
#[rustc_clean(cfg="cfail2", except="hir_owner_items")]
2525
#[rustc_clean(cfg="cfail3")]
2626
pub fn change_closure_body() {
2727
let _ = || 3u32;
@@ -37,7 +37,7 @@ pub fn add_parameter() {
3737
}
3838

3939
#[cfg(not(cfail1))]
40-
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir, typeck_tables_of")]
40+
#[rustc_clean(cfg="cfail2", except="hir_owner_items, mir_built, optimized_mir, typeck_tables_of")]
4141
#[rustc_clean(cfg="cfail3")]
4242
pub fn add_parameter() {
4343
let x = 0u32;
@@ -53,7 +53,7 @@ pub fn change_parameter_pattern() {
5353
}
5454

5555
#[cfg(not(cfail1))]
56-
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, typeck_tables_of")]
56+
#[rustc_clean(cfg="cfail2", except="hir_owner_items, mir_built, typeck_tables_of")]
5757
#[rustc_clean(cfg="cfail3")]
5858
pub fn change_parameter_pattern() {
5959
let _ = |(x,): (u32,)| x;
@@ -68,7 +68,7 @@ pub fn add_move() {
6868
}
6969

7070
#[cfg(not(cfail1))]
71-
#[rustc_clean(cfg="cfail2", except="HirBody")]
71+
#[rustc_clean(cfg="cfail2", except="hir_owner_items")]
7272
#[rustc_clean(cfg="cfail3")]
7373
pub fn add_move() {
7474
let _ = move || 1;
@@ -84,7 +84,7 @@ pub fn add_type_ascription_to_parameter() {
8484
}
8585

8686
#[cfg(not(cfail1))]
87-
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, typeck_tables_of")]
87+
#[rustc_clean(cfg="cfail2", except="hir_owner_items, mir_built, typeck_tables_of")]
8888
#[rustc_clean(cfg="cfail3")]
8989
pub fn add_type_ascription_to_parameter() {
9090
let closure = |x: u32| x + 1u32;
@@ -101,7 +101,7 @@ pub fn change_parameter_type() {
101101
}
102102

103103
#[cfg(not(cfail1))]
104-
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir, typeck_tables_of")]
104+
#[rustc_clean(cfg="cfail2", except="hir_owner_items, mir_built, optimized_mir, typeck_tables_of")]
105105
#[rustc_clean(cfg="cfail3")]
106106
pub fn change_parameter_type() {
107107
let closure = |x: u16| (x as u64) + 1;

src/test/incremental/hashes/consts.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
const CONST_VISIBILITY: u8 = 0;
2020

2121
#[cfg(not(cfail1))]
22-
#[rustc_clean(cfg="cfail2", except="Hir,HirBody")]
22+
#[rustc_clean(cfg="cfail2", except="Hir,hir_owner_items")]
2323
#[rustc_clean(cfg="cfail3")]
2424
pub const CONST_VISIBILITY: u8 = 0;
2525

@@ -29,7 +29,7 @@ pub const CONST_VISIBILITY: u8 = 0;
2929
const CONST_CHANGE_TYPE_1: i32 = 0;
3030

3131
#[cfg(not(cfail1))]
32-
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
32+
#[rustc_clean(cfg="cfail2", except="Hir,hir_owner_items,type_of")]
3333
#[rustc_clean(cfg="cfail3")]
3434
const CONST_CHANGE_TYPE_1: u32 = 0;
3535

@@ -39,13 +39,13 @@ const CONST_CHANGE_TYPE_1: u32 = 0;
3939
const CONST_CHANGE_TYPE_2: Option<u32> = None;
4040

4141
#[cfg(not(cfail1))]
42-
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
42+
#[rustc_clean(cfg="cfail2", except="Hir,hir_owner_items,type_of")]
4343
#[rustc_clean(cfg="cfail3")]
4444
const CONST_CHANGE_TYPE_2: Option<u64> = None;
4545

4646

4747
// Change value between simple literals
48-
#[rustc_clean(cfg="cfail2", except="HirBody")]
48+
#[rustc_clean(cfg="cfail2", except="hir_owner_items")]
4949
#[rustc_clean(cfg="cfail3")]
5050
const CONST_CHANGE_VALUE_1: i16 = {
5151
#[cfg(cfail1)]
@@ -57,7 +57,7 @@ const CONST_CHANGE_VALUE_1: i16 = {
5757

5858

5959
// Change value between expressions
60-
#[rustc_clean(cfg="cfail2", except="HirBody")]
60+
#[rustc_clean(cfg="cfail2", except="hir_owner_items")]
6161
#[rustc_clean(cfg="cfail3")]
6262
const CONST_CHANGE_VALUE_2: i16 = {
6363
#[cfg(cfail1)]
@@ -67,7 +67,7 @@ const CONST_CHANGE_VALUE_2: i16 = {
6767
{ 1 + 2 }
6868
};
6969

70-
#[rustc_clean(cfg="cfail2", except="HirBody")]
70+
#[rustc_clean(cfg="cfail2", except="hir_owner_items")]
7171
#[rustc_clean(cfg="cfail3")]
7272
const CONST_CHANGE_VALUE_3: i16 = {
7373
#[cfg(cfail1)]
@@ -77,7 +77,7 @@ const CONST_CHANGE_VALUE_3: i16 = {
7777
{ 2 * 3 }
7878
};
7979

80-
#[rustc_clean(cfg="cfail2", except="HirBody")]
80+
#[rustc_clean(cfg="cfail2", except="hir_owner_items")]
8181
#[rustc_clean(cfg="cfail3")]
8282
const CONST_CHANGE_VALUE_4: i16 = {
8383
#[cfg(cfail1)]
@@ -99,11 +99,11 @@ mod const_change_type_indirectly {
9999
#[cfg(not(cfail1))]
100100
use super::ReferencedType2 as Type;
101101

102-
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
102+
#[rustc_clean(cfg="cfail2", except="Hir,hir_owner_items,type_of")]
103103
#[rustc_clean(cfg="cfail3")]
104104
const CONST_CHANGE_TYPE_INDIRECTLY_1: Type = Type;
105105

106-
#[rustc_clean(cfg="cfail2", except="Hir,HirBody,type_of")]
106+
#[rustc_clean(cfg="cfail2", except="Hir,hir_owner_items,type_of")]
107107
#[rustc_clean(cfg="cfail3")]
108108
const CONST_CHANGE_TYPE_INDIRECTLY_2: Option<Type> = None;
109109
}

src/test/incremental/hashes/enum_constructors.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub fn change_field_value_struct_like() -> Enum {
3434
}
3535

3636
#[cfg(not(cfail1))]
37-
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
37+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,optimized_mir,mir_built")]
3838
#[rustc_clean(cfg="cfail3")]
3939
pub fn change_field_value_struct_like() -> Enum {
4040
Enum::Struct {
@@ -57,7 +57,7 @@ pub fn change_field_order_struct_like() -> Enum {
5757
}
5858

5959
#[cfg(not(cfail1))]
60-
#[rustc_clean(cfg="cfail2", except="HirBody,typeck_tables_of")]
60+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,typeck_tables_of")]
6161
#[rustc_clean(cfg="cfail3")]
6262
// FIXME(michaelwoerister):Interesting. I would have thought that that changes the MIR. And it
6363
// would if it were not all constants
@@ -96,7 +96,7 @@ pub fn change_constructor_path_struct_like() {
9696
}
9797

9898
#[cfg(not(cfail1))]
99-
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built,typeck_tables_of")]
99+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,optimized_mir,mir_built,typeck_tables_of")]
100100
#[rustc_clean(cfg="cfail3")]
101101
pub fn change_constructor_path_struct_like() {
102102
let _ = Enum2::Struct {
@@ -119,7 +119,7 @@ pub fn change_constructor_variant_struct_like() {
119119
}
120120

121121
#[cfg(not(cfail1))]
122-
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
122+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,optimized_mir,mir_built")]
123123
#[rustc_clean(cfg="cfail3")]
124124
pub fn change_constructor_variant_struct_like() {
125125
let _ = Enum2::Struct2 {
@@ -139,7 +139,7 @@ pub mod change_constructor_path_indirectly_struct_like {
139139

140140
#[rustc_clean(
141141
cfg="cfail2",
142-
except="fn_sig,Hir,HirBody,optimized_mir,mir_built,\
142+
except="fn_sig,Hir,hir_owner_items,optimized_mir,mir_built,\
143143
typeck_tables_of"
144144
)]
145145
#[rustc_clean(cfg="cfail3")]
@@ -161,7 +161,7 @@ pub mod change_constructor_variant_indirectly_struct_like {
161161
#[cfg(not(cfail1))]
162162
use super::Enum2::Struct2 as Variant;
163163

164-
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
164+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,optimized_mir,mir_built")]
165165
#[rustc_clean(cfg="cfail3")]
166166
pub fn function() -> Enum2 {
167167
Variant {
@@ -180,7 +180,7 @@ pub fn change_field_value_tuple_like() -> Enum {
180180
}
181181

182182
#[cfg(not(cfail1))]
183-
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
183+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,optimized_mir,mir_built")]
184184
#[rustc_clean(cfg="cfail3")]
185185
pub fn change_field_value_tuple_like() -> Enum {
186186
Enum::Tuple(0, 1, 3)
@@ -197,7 +197,7 @@ pub fn change_constructor_path_tuple_like() {
197197
#[cfg(not(cfail1))]
198198
#[rustc_clean(
199199
cfg="cfail2",
200-
except="HirBody,optimized_mir,mir_built,typeck_tables_of"
200+
except="hir_owner_items,optimized_mir,mir_built,typeck_tables_of"
201201
)]
202202
#[rustc_clean(cfg="cfail3")]
203203
pub fn change_constructor_path_tuple_like() {
@@ -215,7 +215,7 @@ pub fn change_constructor_variant_tuple_like() {
215215
#[cfg(not(cfail1))]
216216
#[rustc_clean(
217217
cfg="cfail2",
218-
except="HirBody,optimized_mir,mir_built,typeck_tables_of"
218+
except="hir_owner_items,optimized_mir,mir_built,typeck_tables_of"
219219
)]
220220
#[rustc_clean(cfg="cfail3")]
221221
pub fn change_constructor_variant_tuple_like() {
@@ -232,7 +232,7 @@ pub mod change_constructor_path_indirectly_tuple_like {
232232

233233
#[rustc_clean(
234234
cfg="cfail2",
235-
except="fn_sig,Hir,HirBody,optimized_mir,mir_built,\
235+
except="fn_sig,Hir,hir_owner_items,optimized_mir,mir_built,\
236236
typeck_tables_of"
237237
)]
238238
#[rustc_clean(cfg="cfail3")]
@@ -251,7 +251,7 @@ pub mod change_constructor_variant_indirectly_tuple_like {
251251
#[cfg(not(cfail1))]
252252
use super::Enum2::Tuple2 as Variant;
253253

254-
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built,typeck_tables_of")]
254+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,optimized_mir,mir_built,typeck_tables_of")]
255255
#[rustc_clean(cfg="cfail3")]
256256
pub fn function() -> Enum2 {
257257
Variant(0, 1, 2)
@@ -278,7 +278,7 @@ pub fn change_constructor_path_c_like() {
278278
}
279279

280280
#[cfg(not(cfail1))]
281-
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built,typeck_tables_of")]
281+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,optimized_mir,mir_built,typeck_tables_of")]
282282
#[rustc_clean(cfg="cfail3")]
283283
pub fn change_constructor_path_c_like() {
284284
let _ = Clike2::B;
@@ -293,7 +293,7 @@ pub fn change_constructor_variant_c_like() {
293293
}
294294

295295
#[cfg(not(cfail1))]
296-
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
296+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,optimized_mir,mir_built")]
297297
#[rustc_clean(cfg="cfail3")]
298298
pub fn change_constructor_variant_c_like() {
299299
let _ = Clike::C;
@@ -309,7 +309,7 @@ pub mod change_constructor_path_indirectly_c_like {
309309

310310
#[rustc_clean(
311311
cfg="cfail2",
312-
except="fn_sig,Hir,HirBody,optimized_mir,mir_built,\
312+
except="fn_sig,Hir,hir_owner_items,optimized_mir,mir_built,\
313313
typeck_tables_of"
314314
)]
315315
#[rustc_clean(cfg="cfail3")]
@@ -328,7 +328,7 @@ pub mod change_constructor_variant_indirectly_c_like {
328328
#[cfg(not(cfail1))]
329329
use super::Clike::B as Variant;
330330

331-
#[rustc_clean(cfg="cfail2", except="HirBody,optimized_mir,mir_built")]
331+
#[rustc_clean(cfg="cfail2", except="hir_owner_items,optimized_mir,mir_built")]
332332
#[rustc_clean(cfg="cfail3")]
333333
pub fn function() -> Clike {
334334
Variant

0 commit comments

Comments
 (0)