Skip to content

Commit ee4a7eb

Browse files
incr.comp.: Make sanity check in try_mark_green() aware of error conditions.
1 parent cc34ca1 commit ee4a7eb

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/librustc/dep_graph/graph.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,15 @@ impl DepGraph {
648648
return None
649649
}
650650
None => {
651-
bug!("try_mark_green() - Forcing the DepNode \
652-
should have set its color")
651+
if !tcx.sess.has_errors() {
652+
bug!("try_mark_green() - Forcing the DepNode \
653+
should have set its color")
654+
} else {
655+
// If the query we just forced has resulted
656+
// in some kind of compilation error, we
657+
// don't expect that the corresponding
658+
// dep-node color has been updated.
659+
}
653660
}
654661
}
655662
} else {

0 commit comments

Comments
 (0)