Skip to content

Commit e11ef37

Browse files
committed
Adjust some tests
1 parent 6fbc75b commit e11ef37

File tree

8 files changed

+39
-37
lines changed

8 files changed

+39
-37
lines changed

compiler/rustc_query_system/src/dep_graph/graph.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl std::convert::From<DepNodeIndex> for QueryInvocationId {
5151
}
5252
}
5353

54-
#[derive(PartialEq)]
54+
#[derive(PartialEq, Debug)]
5555
pub enum DepNodeColor {
5656
Red,
5757
Green(DepNodeIndex),
@@ -285,6 +285,7 @@ impl<K: DepKind> DepGraph<K> {
285285
key
286286
);
287287

288+
tracing::info!("Inserting color: {:?} {:?}", key, color);
288289
data.colors.insert(prev_index, color);
289290
}
290291

@@ -1156,6 +1157,7 @@ impl DepNodeColorMap {
11561157
}
11571158

11581159
fn insert(&self, index: SerializedDepNodeIndex, color: DepNodeColor) {
1160+
tracing::info!("Actually storing: {:?} {:?}", index, color);
11591161
self.values[index].store(
11601162
match color {
11611163
DepNodeColor::Red => COMPRESSED_RED,

src/test/incremental/hashes/enum_defs.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ enum EnumVisibility { A }
3434
#[cfg(not(any(cfail1,cfail4)))]
3535
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
3636
#[rustc_clean(cfg="cfail3")]
37-
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
37+
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
3838
#[rustc_clean(cfg="cfail6")]
3939
pub enum EnumVisibility {
4040
A
@@ -251,7 +251,7 @@ enum EnumChangeFieldTypeTupleStyleVariant {
251251
#[cfg(not(any(cfail1,cfail4)))]
252252
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
253253
#[rustc_clean(cfg="cfail3")]
254-
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
254+
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
255255
#[rustc_clean(cfg="cfail6")]
256256
enum EnumChangeFieldTypeTupleStyleVariant {
257257
Variant1(u32,
@@ -270,7 +270,7 @@ enum EnumChangeFieldTypeStructStyleVariant {
270270
#[cfg(not(any(cfail1,cfail4)))]
271271
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
272272
#[rustc_clean(cfg="cfail3")]
273-
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
273+
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
274274
#[rustc_clean(cfg="cfail6")]
275275
enum EnumChangeFieldTypeStructStyleVariant {
276276
Variant1,
@@ -308,7 +308,7 @@ enum EnumChangeOrderTupleStyleVariant {
308308
#[cfg(not(any(cfail1,cfail4)))]
309309
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
310310
#[rustc_clean(cfg="cfail3")]
311-
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
311+
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
312312
#[rustc_clean(cfg="cfail6")]
313313
enum EnumChangeOrderTupleStyleVariant {
314314
Variant1(
@@ -491,7 +491,7 @@ enum EnumAddLifetimeParameterBound<'a, 'b> {
491491
#[cfg(not(any(cfail1,cfail4)))]
492492
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,predicates_of")]
493493
#[rustc_clean(cfg="cfail3")]
494-
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,predicates_of")]
494+
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,predicates_of,type_of")]
495495
#[rustc_clean(cfg="cfail6")]
496496
enum EnumAddLifetimeParameterBound<'a, 'b: 'a> {
497497
Variant1(&'a u32),
@@ -508,7 +508,7 @@ enum EnumAddLifetimeBoundToParameter<'a, T> {
508508
#[cfg(not(any(cfail1,cfail4)))]
509509
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,predicates_of")]
510510
#[rustc_clean(cfg="cfail3")]
511-
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,generics_of,predicates_of")]
511+
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of")]
512512
#[rustc_clean(cfg="cfail6")]
513513
enum EnumAddLifetimeBoundToParameter<'a, T: 'a> {
514514
Variant1(T),
@@ -544,7 +544,7 @@ enum EnumAddLifetimeParameterBoundWhere<'a, 'b> {
544544
#[cfg(not(any(cfail1,cfail4)))]
545545
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,predicates_of")]
546546
#[rustc_clean(cfg="cfail3")]
547-
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,predicates_of")]
547+
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,predicates_of,type_of")]
548548
#[rustc_clean(cfg="cfail6")]
549549
enum EnumAddLifetimeParameterBoundWhere<'a, 'b> where 'b: 'a {
550550
Variant1(&'a u32),
@@ -563,7 +563,7 @@ enum EnumAddLifetimeBoundToParameterWhere<'a, T> {
563563
#[cfg(not(any(cfail1,cfail4)))]
564564
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,predicates_of")]
565565
#[rustc_clean(cfg="cfail3")]
566-
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,generics_of,predicates_of")]
566+
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of")]
567567
#[rustc_clean(cfg="cfail6")]
568568
enum EnumAddLifetimeBoundToParameterWhere<'a, T> where T: 'a {
569569
Variant1(T),
@@ -599,7 +599,7 @@ enum EnumSwapUsageTypeParameters<A, B> {
599599
#[cfg(not(any(cfail1,cfail4)))]
600600
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
601601
#[rustc_clean(cfg="cfail3")]
602-
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
602+
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
603603
#[rustc_clean(cfg="cfail6")]
604604
enum EnumSwapUsageTypeParameters<A, B> {
605605
Variant1 {
@@ -622,7 +622,7 @@ enum EnumSwapUsageLifetimeParameters<'a, 'b> {
622622
#[cfg(not(any(cfail1,cfail4)))]
623623
#[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes")]
624624
#[rustc_clean(cfg="cfail3")]
625-
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes")]
625+
#[rustc_clean(cfg="cfail5", except="hir_owner,hir_owner_nodes,type_of")]
626626
#[rustc_clean(cfg="cfail6")]
627627
enum EnumSwapUsageLifetimeParameters<'a, 'b> {
628628
Variant1 {

src/test/incremental/hashes/inherent_impls.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ impl Foo {
210210
impl Foo {
211211
#[rustc_clean(cfg="cfail2")]
212212
#[rustc_clean(cfg="cfail3")]
213-
#[rustc_clean(cfg="cfail5")]
213+
#[rustc_clean(cfg="cfail5", except="associated_item")]
214214
#[rustc_clean(cfg="cfail6")]
215215
pub fn add_method_to_impl1(&self) { }
216216

@@ -704,7 +704,7 @@ impl<T> Bar<T> {
704704
#[rustc_clean(cfg="cfail3")]
705705
#[rustc_clean(
706706
cfg="cfail5",
707-
except="generics_of,fn_sig,typeck,type_of,optimized_mir"
707+
except="generics_of,fn_sig,typeck,type_of,optimized_mir,associated_item"
708708
)]
709709
#[rustc_clean(cfg="cfail6")]
710710
pub fn add_type_parameter_to_impl(&self) { }
@@ -726,7 +726,7 @@ impl Bar<u32> {
726726
impl Bar<u64> {
727727
#[rustc_clean(cfg="cfail2", except="fn_sig,optimized_mir,typeck")]
728728
#[rustc_clean(cfg="cfail3")]
729-
#[rustc_clean(cfg="cfail5", except="fn_sig,optimized_mir,typeck")]
729+
#[rustc_clean(cfg="cfail5", except="fn_sig,optimized_mir,typeck,associated_item")]
730730
#[rustc_clean(cfg="cfail6")]
731731
pub fn change_impl_self_type(&self) { }
732732
}
@@ -747,7 +747,7 @@ impl<T> Bar<T> {
747747
impl<T: 'static> Bar<T> {
748748
#[rustc_clean(cfg="cfail2")]
749749
#[rustc_clean(cfg="cfail3")]
750-
#[rustc_clean(cfg="cfail5")]
750+
#[rustc_clean(cfg="cfail5", except="associated_item")]
751751
#[rustc_clean(cfg="cfail6")]
752752
pub fn add_lifetime_bound_to_impl_parameter(&self) { }
753753
}
@@ -768,7 +768,7 @@ impl<T> Bar<T> {
768768
impl<T: Clone> Bar<T> {
769769
#[rustc_clean(cfg="cfail2")]
770770
#[rustc_clean(cfg="cfail3")]
771-
#[rustc_clean(cfg="cfail5")]
771+
#[rustc_clean(cfg="cfail5", except="associated_item")]
772772
#[rustc_clean(cfg="cfail6")]
773773
pub fn add_trait_bound_to_impl_parameter(&self) { }
774774
}

src/test/incremental/hashes/struct_defs.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct TupleStructFieldType(i32);
5656
#[cfg(not(any(cfail1,cfail4)))]
5757
#[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
5858
#[rustc_clean(cfg="cfail3")]
59-
#[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
59+
#[rustc_clean(except="hir_owner,hir_owner_nodes,type_of", cfg="cfail5")]
6060
#[rustc_clean(cfg="cfail6")]
6161
// Note that changing the type of a field does not change the type of the struct or enum, but
6262
// adding/removing fields or changing a fields name or visibility does.
@@ -102,7 +102,7 @@ struct RecordStructFieldType { x: f32 }
102102
#[cfg(not(any(cfail1,cfail4)))]
103103
#[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
104104
#[rustc_clean(cfg="cfail3")]
105-
#[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
105+
#[rustc_clean(except="hir_owner,hir_owner_nodes,type_of", cfg="cfail5")]
106106
#[rustc_clean(cfg="cfail6")]
107107
// Note that changing the type of a field does not change the type of the struct or enum, but
108108
// adding/removing fields or changing a fields name or visibility does.
@@ -175,7 +175,7 @@ struct AddLifetimeParameterBound<'a, 'b>(&'a f32, &'b f64);
175175
#[cfg(not(any(cfail1,cfail4)))]
176176
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
177177
#[rustc_clean(cfg="cfail3")]
178-
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
178+
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of,type_of", cfg="cfail5")]
179179
#[rustc_clean(cfg="cfail6")]
180180
struct AddLifetimeParameterBound<'a, 'b: 'a>(
181181
&'a f32,
@@ -188,7 +188,7 @@ struct AddLifetimeParameterBoundWhereClause<'a, 'b>(&'a f32, &'b f64);
188188
#[cfg(not(any(cfail1,cfail4)))]
189189
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
190190
#[rustc_clean(cfg="cfail3")]
191-
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
191+
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of,type_of", cfg="cfail5")]
192192
#[rustc_clean(cfg="cfail6")]
193193
struct AddLifetimeParameterBoundWhereClause<'a, 'b>(
194194
&'a f32,
@@ -222,7 +222,7 @@ struct AddTypeParameterBound<T>(T);
222222
#[cfg(not(any(cfail1,cfail4)))]
223223
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
224224
#[rustc_clean(cfg="cfail3")]
225-
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
225+
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of,type_of", cfg="cfail5")]
226226
#[rustc_clean(cfg="cfail6")]
227227
struct AddTypeParameterBound<T: Send>(
228228
T
@@ -235,7 +235,7 @@ struct AddTypeParameterBoundWhereClause<T>(T);
235235
#[cfg(not(any(cfail1,cfail4)))]
236236
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
237237
#[rustc_clean(cfg="cfail3")]
238-
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")]
238+
#[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of,type_of", cfg="cfail5")]
239239
#[rustc_clean(cfg="cfail6")]
240240
struct AddTypeParameterBoundWhereClause<T>(
241241
T
@@ -262,7 +262,7 @@ struct Visibility;
262262
#[cfg(not(any(cfail1,cfail4)))]
263263
#[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
264264
#[rustc_clean(cfg="cfail3")]
265-
#[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail5")]
265+
#[rustc_clean(except="hir_owner,hir_owner_nodes,type_of", cfg="cfail5")]
266266
#[rustc_clean(cfg="cfail6")]
267267
pub struct Visibility;
268268

src/test/incremental/hashes/trait_defs.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,12 @@ trait TraitAddUnsafeModifier {
400400
#[cfg(not(any(cfail1,cfail4)))]
401401
#[rustc_clean(cfg="cfail2")]
402402
#[rustc_clean(cfg="cfail3")]
403-
#[rustc_clean(cfg="cfail5")]
403+
#[rustc_clean(cfg="cfail5", except="hir_owner")]
404404
#[rustc_clean(cfg="cfail6")]
405405
trait TraitAddUnsafeModifier {
406406
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
407407
#[rustc_clean(cfg="cfail3")]
408-
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail5")]
408+
#[rustc_clean(except="hir_owner,fn_sig,associated_item", cfg="cfail5")]
409409
#[rustc_clean(cfg="cfail6")]
410410
unsafe fn method();
411411
}
@@ -425,12 +425,12 @@ trait TraitAddExternModifier {
425425
#[cfg(not(any(cfail1,cfail4)))]
426426
#[rustc_clean(cfg="cfail2")]
427427
#[rustc_clean(cfg="cfail3")]
428-
#[rustc_clean(cfg="cfail5")]
428+
#[rustc_clean(cfg="cfail5", except="hir_owner")]
429429
#[rustc_clean(cfg="cfail6")]
430430
trait TraitAddExternModifier {
431431
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
432432
#[rustc_clean(cfg="cfail3")]
433-
#[rustc_clean(except="hir_owner,fn_sig", cfg="cfail5")]
433+
#[rustc_clean(except="hir_owner,fn_sig,associated_item", cfg="cfail5")]
434434
#[rustc_clean(cfg="cfail6")]
435435
extern "C" fn method();
436436
}
@@ -850,7 +850,7 @@ trait TraitAddInitializerToAssociatedConstant {
850850

851851
#[rustc_clean(cfg="cfail2")]
852852
#[rustc_clean(cfg="cfail3")]
853-
#[rustc_clean(cfg="cfail5")]
853+
#[rustc_clean(cfg="cfail5", except="associated_item")]
854854
#[rustc_clean(cfg="cfail6")]
855855
fn method();
856856
}

src/test/incremental/hashes/trait_impls.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,12 @@ pub trait AddArgumentTrait {
400400
#[cfg(not(any(cfail1,cfail4)))]
401401
#[rustc_clean(cfg="cfail2")]
402402
#[rustc_clean(cfg="cfail3")]
403-
#[rustc_clean(cfg="cfail5")]
403+
#[rustc_clean(cfg="cfail5", except="hir_owner")]
404404
#[rustc_clean(cfg="cfail6")]
405405
impl AddArgumentTrait for Foo {
406406
#[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir", cfg="cfail2")]
407407
#[rustc_clean(cfg="cfail3")]
408-
#[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir", cfg="cfail5")]
408+
#[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir,associated_item", cfg="cfail5")]
409409
#[rustc_clean(cfg="cfail6")]
410410
fn method_name(&self, _x: u32) { }
411411
}
@@ -470,7 +470,7 @@ impl<TTT> AddTypeParameterToImpl<TTT> for Bar<TTT> {
470470
)]
471471
#[rustc_clean(cfg="cfail3")]
472472
#[rustc_clean(
473-
except="hir_owner,hir_owner_nodes,generics_of,fn_sig,type_of,typeck,optimized_mir",
473+
except="hir_owner,hir_owner_nodes,generics_of,fn_sig,type_of,typeck,optimized_mir,associated_item",
474474
cfg="cfail5",
475475
)]
476476
#[rustc_clean(cfg="cfail6")]
@@ -497,7 +497,7 @@ impl ChangeSelfTypeOfImpl for u32 {
497497
impl ChangeSelfTypeOfImpl for u64 {
498498
#[rustc_clean(except="fn_sig,typeck,optimized_mir", cfg="cfail2")]
499499
#[rustc_clean(cfg="cfail3")]
500-
#[rustc_clean(except="fn_sig,typeck,optimized_mir", cfg="cfail5")]
500+
#[rustc_clean(except="fn_sig,typeck,optimized_mir,associated_item", cfg="cfail5")]
501501
#[rustc_clean(cfg="cfail6")]
502502
fn id(self) -> Self { self }
503503
}
@@ -522,7 +522,7 @@ impl<T> AddLifetimeBoundToImplParameter for T {
522522
impl<T: 'static> AddLifetimeBoundToImplParameter for T {
523523
#[rustc_clean(cfg="cfail2")]
524524
#[rustc_clean(cfg="cfail3")]
525-
#[rustc_clean(cfg="cfail5")]
525+
#[rustc_clean(cfg="cfail5", except="associated_item")]
526526
#[rustc_clean(cfg="cfail6")]
527527
fn id(self) -> Self { self }
528528
}
@@ -547,7 +547,7 @@ impl<T> AddTraitBoundToImplParameter for T {
547547
impl<T: Clone> AddTraitBoundToImplParameter for T {
548548
#[rustc_clean(cfg="cfail2")]
549549
#[rustc_clean(cfg="cfail3")]
550-
#[rustc_clean(cfg="cfail5")]
550+
#[rustc_clean(cfg="cfail5", except="associated_item")]
551551
#[rustc_clean(cfg="cfail6")]
552552
fn id(self) -> Self { self }
553553
}

src/test/incremental/spans_in_type_debuginfo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// ignore-asmjs wasm2js does not support source maps yet
55
// revisions:rpass1 rpass2
6-
// compile-flags: -Z query-dep-graph -g
6+
// compile-flags: -Z query-dep-graph -g -Z dep-tasks
77

88
#![rustc_partition_reused(module="spans_in_type_debuginfo-structs", cfg="rpass2")]
99
#![rustc_partition_reused(module="spans_in_type_debuginfo-enums", cfg="rpass2")]

src/test/incremental/struct_change_nothing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ pub struct Y {
2424
pub y: char
2525
}
2626

27-
#[rustc_clean(cfg="rpass2")]
27+
#[rustc_clean(cfg="rpass2", except="typeck")]
2828
pub fn use_X() -> u32 {
2929
let x: X = X { x: 22 };
3030
x.x as u32
3131
}
3232

33-
#[rustc_clean(cfg="rpass2")]
33+
#[rustc_clean(cfg="rpass2", except="typeck")]
3434
pub fn use_EmbedX(x: EmbedX) -> u32 {
3535
let x: X = X { x: 22 };
3636
x.x as u32

0 commit comments

Comments
 (0)