@@ -570,6 +570,7 @@ macro_rules! define_feedable {
570
570
let value = restore:: <$V>( erased) ;
571
571
let cache = & tcx. query_system. caches. $name;
572
572
573
+ let dep_kind: dep_graph:: DepKind = dep_graph:: dep_kinds:: $name;
573
574
let hasher: Option <fn ( & mut StableHashingContext <' _>, & _) -> _> = hash_result!( [ $( $modifiers) * ] ) ;
574
575
match try_get_cached( tcx, cache, & key) {
575
576
Some ( old) => {
@@ -583,28 +584,27 @@ macro_rules! define_feedable {
583
584
// results is tainted by errors. In this case, delay a bug to
584
585
// ensure compilation is doomed, and keep the `old` value.
585
586
tcx. dcx( ) . delayed_bug( format!(
586
- "Trying to feed an already recorded value for query {} key={key:?}:\n \
587
+ "Trying to feed an already recorded value for query {dep_kind:? } key={key:?}:\n \
587
588
old value: {old:?}\n new value: {value:?}",
588
- stringify!( $name) ,
589
589
) ) ;
590
590
}
591
591
} else {
592
592
// The query is `no_hash`, so we have no way to perform a sanity check.
593
593
// If feeding the same value multiple times needs to be supported,
594
594
// the query should not be marked `no_hash`.
595
595
bug!(
596
- "Trying to feed an already recorded value for query {} key={key:?}:\n old value: {old:?} \n new value: {value:?}" ,
597
- stringify! ( $name ) ,
596
+ "Trying to feed an already recorded value for query {dep_kind:? } key={key:?}:\n \
597
+ old value: {old:?} \n new value: {value:?}" ,
598
598
)
599
599
}
600
600
}
601
601
None => {
602
- let dep_node = dep_graph:: DepNode :: construct( tcx, dep_graph :: dep_kinds :: $name , & key) ;
602
+ let dep_node = dep_graph:: DepNode :: construct( tcx, dep_kind , & key) ;
603
603
let dep_node_index = tcx. dep_graph. with_feed_task(
604
604
dep_node,
605
605
tcx,
606
606
& value,
607
- hash_result! ( [ $ ( $modifiers ) * ] ) ,
607
+ hasher ,
608
608
) ;
609
609
cache. complete( key, erased, dep_node_index) ;
610
610
}
0 commit comments