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 @@ -491,7 +491,16 @@ macro_rules! define_maps {
491491 span: Span ,
492492 dep_node: DepNode )
493493 -> Result <( $V, DepNodeIndex ) , CycleError <' a, $tcx>> {
494- debug_assert!( !tcx. dep_graph. dep_node_exists( & dep_node) ) ;
494+ // If the following assertion triggers, it can have two reasons:
495+ // 1. Something is wrong with DepNode creation, either here or
496+ // in DepGraph::try_mark_green()
497+ // 2. Two distinct query keys get mapped to the same DepNode
498+ // (see for example #48923)
499+ assert!( !tcx. dep_graph. dep_node_exists( & dep_node) ,
500+ "Forcing query with already existing DepNode.\n \
501+ - query-key: {:?}\n \
502+ - dep-node: {:?}",
503+ key, dep_node) ;
495504
496505 profq_msg!( tcx, ProfileQueriesMsg :: ProviderBegin ) ;
497506 let res = tcx. cycle_check( span, Query :: $name( key) , || {
You can’t perform that action at this time.
0 commit comments