File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 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 {
636636 map: LockGuard <' _, QueryMap <$tcx, Self >>,
637637 dep_node: DepNode )
638638 -> 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) ;
640649
641650 profq_msg!( tcx, ProfileQueriesMsg :: ProviderBegin ) ;
642651 let res = Self :: start_job( tcx,
You can’t perform that action at this time.
0 commit comments