File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -636,7 +636,16 @@ macro_rules! define_maps {
636
636
map: LockGuard <' _, QueryMap <$tcx, Self >>,
637
637
dep_node: DepNode )
638
638
-> Result <( $V, DepNodeIndex ) , CycleError <$tcx>> {
639
- debug_assert!( !tcx. dep_graph. dep_node_exists( & dep_node) ) ;
639
+ // If the following assertion triggers, it can have two reasons:
640
+ // 1. Something is wrong with DepNode creation, either here or
641
+ // in DepGraph::try_mark_green()
642
+ // 2. Two distinct query keys get mapped to the same DepNode
643
+ // (see for example #48923)
644
+ assert!( !tcx. dep_graph. dep_node_exists( & dep_node) ,
645
+ "Forcing query with already existing DepNode.\n \
646
+ - query-key: {:?}\n \
647
+ - dep-node: {:?}",
648
+ key, dep_node) ;
640
649
641
650
profq_msg!( tcx, ProfileQueriesMsg :: ProviderBegin ) ;
642
651
let res = Self :: start_job( tcx,
You can’t perform that action at this time.
0 commit comments