Skip to content

Commit

Permalink
Reintroduce workaround for rust-lang#62649
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoxc committed Mar 14, 2020
1 parent 10b23e3 commit 6258c01
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/librustc/dep_graph/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -654,18 +654,25 @@ impl DepGraph {
continue;
}
} else {
// FIXME: This match is just a workaround for incremental bugs and should
// be removed. https://github.com/rust-lang/rust/issues/62649 is one such
// bug that must be fixed before removing this.
match dep_dep_node.kind {
DepKind::CrateMetadata => {
DepKind::hir_owner
| DepKind::hir_owner_items
| DepKind::CrateMetadata => {
if let Some(def_id) = dep_dep_node.extract_def_id(tcx) {
if def_id_corresponds_to_hir_dep_node(tcx, def_id) {
// The `DefPath` has corresponding node,
// and that node should have been marked
// either red or green in `data.colors`.
bug!(
"DepNode {:?} should have been \
if dep_dep_node.kind == DepKind::CrateMetadata {
// The `DefPath` has corresponding node,
// and that node should have been marked
// either red or green in `data.colors`.
bug!(
"DepNode {:?} should have been \
pre-marked as red or green but wasn't.",
dep_dep_node
);
dep_dep_node
);
}
} else {
// This `DefPath` does not have a
// corresponding `DepNode` (e.g. a
Expand Down

0 comments on commit 6258c01

Please sign in to comment.