Auto merge of #49088 - michaelwoerister:fix-49070, r=nikomatsakis
incr.comp.: Make sanity check in try_mark_green() aware of error conditions. Before this PR, `DepGraph::try_mark_green()` assumed that forcing a query would always set the color of the corresponding dep-node. However, it did not take into account that queries could also fail (e.g. with a cycle error). This PR makes the method handle that condition gracefully. Fixes #49070. r? @nikomatsakis
This commit is contained in:
commit
cf5cc2e41e
1 changed files with 9 additions and 2 deletions
|
@ -648,8 +648,15 @@ impl DepGraph {
|
|||
return None
|
||||
}
|
||||
None => {
|
||||
bug!("try_mark_green() - Forcing the DepNode \
|
||||
should have set its color")
|
||||
if !tcx.sess.has_errors() {
|
||||
bug!("try_mark_green() - Forcing the DepNode \
|
||||
should have set its color")
|
||||
} else {
|
||||
// If the query we just forced has resulted
|
||||
// in some kind of compilation error, we
|
||||
// don't expect that the corresponding
|
||||
// dep-node color has been updated.
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue