@@ -545,6 +545,10 @@ impl DepGraph {
545
545
Some ( DepNodeColor :: Green ( dep_node_index) ) => Some ( ( prev_index, dep_node_index) ) ,
546
546
Some ( DepNodeColor :: Red ) => None ,
547
547
None => {
548
+ // This DepNode and the corresponding query invocation existed
549
+ // in the previous compilation session too, so we can try to
550
+ // mark it as green by recursively marking all of its
551
+ // dependencies green.
548
552
self . try_mark_previous_green (
549
553
tcx. global_tcx ( ) ,
550
554
data,
@@ -557,6 +561,7 @@ impl DepGraph {
557
561
}
558
562
}
559
563
564
+ /// Try to mark a dep-node which existed in the previous compilation session as green
560
565
fn try_mark_previous_green < ' tcx > (
561
566
& self ,
562
567
tcx : TyCtxt < ' _ , ' tcx , ' tcx > ,
@@ -572,12 +577,10 @@ impl DepGraph {
572
577
debug_assert ! ( data. colors. get( prev_dep_node_index) . is_none( ) ) ;
573
578
}
574
579
580
+ // We never try to mark inputs as green
575
581
debug_assert ! ( !dep_node. kind. is_input( ) ) ;
576
- debug_assert_eq ! ( data. previous. index_to_node( prev_dep_node_index) , * dep_node) ;
577
582
578
- // We never try to mark inputs as green
579
- // FIXME: Make an debug_assert!
580
- assert ! ( !dep_node. kind. is_input( ) ) ;
583
+ debug_assert_eq ! ( data. previous. index_to_node( prev_dep_node_index) , * dep_node) ;
581
584
582
585
let prev_deps = data. previous . edge_targets_from ( prev_dep_node_index) ;
583
586
0 commit comments