File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -519,6 +519,20 @@ impl DepGraph {
519
519
current_deps. push ( node_index) ;
520
520
continue ;
521
521
}
522
+ } else if cfg ! ( debug_assertions) {
523
+ match dep_dep_node. kind {
524
+ DepKind :: Hir |
525
+ DepKind :: HirBody |
526
+ DepKind :: CrateMetadata => {
527
+ assert ! ( dep_dep_node. extract_def_id( tcx) . is_none( ) ,
528
+ "Input {:?} should have been pre-allocated but wasn't." ,
529
+ dep_dep_node) ;
530
+ }
531
+ _ => {
532
+ // For other kinds of inputs it's OK to be
533
+ // forced.
534
+ }
535
+ }
522
536
}
523
537
524
538
// We failed to mark it green, so we try to force the query.
@@ -549,10 +563,6 @@ impl DepGraph {
549
563
}
550
564
}
551
565
} else {
552
- debug_assert ! ( !dep_dep_node. kind. is_input( ) ||
553
- dep_dep_node. extract_def_id( tcx) . is_none( ) ,
554
- "Could not force input that should still exist." ) ;
555
-
556
566
// The DepNode could not be forced.
557
567
debug ! ( "try_mark_green({:?}) - END - dependency {:?} \
558
568
could not be forced", dep_node, dep_dep_node) ;
You can’t perform that action at this time.
0 commit comments