about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2020-02-12 18:11:32 +0100
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2020-03-14 22:52:31 +0100
commit6258c0144df5f47bfa4aed7d7fa0d6aa86990e46 (patch)
treed46c348079b0389395a32a7c8eba201d282456c9
parent10b23e3fd32e9f017c1193b7c6bc20da8e61b9ab (diff)
downloadrust-6258c0144df5f47bfa4aed7d7fa0d6aa86990e46.tar.gz
rust-6258c0144df5f47bfa4aed7d7fa0d6aa86990e46.zip
Reintroduce workaround for #62649
-rw-r--r--src/librustc/dep_graph/graph.rs23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/librustc/dep_graph/graph.rs b/src/librustc/dep_graph/graph.rs
index 8a8ae60c813..97114b9e313 100644
--- a/src/librustc/dep_graph/graph.rs
+++ b/src/librustc/dep_graph/graph.rs
@@ -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