about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-01-19 09:03:33 +0100
committerGitHub <noreply@github.com>2019-01-19 09:03:33 +0100
commitc7686b787f41dec6db61d58a7bd9e778854b9d3e (patch)
treeccc67d8a75398d7099c803abd9397a8559f168d3
parent83921c31b875ed8b7f73a8bfbd280c643466ebe3 (diff)
parent3884cc8df480eba9bb8d19fa46e9fe6c9f9d729b (diff)
Rollup merge of #57698 - michaelwoerister:issue57692, r=Zoxc
Fix typo bug in DepGraph::try_mark_green().

r? @Zoxc

Fixes #57692.
-rw-r--r--src/librustc/dep_graph/graph.rs2
-rw-r--r--src/test/incremental/change_name_of_static_in_fn.rs17
2 files changed, 18 insertions, 1 deletions
diff --git a/src/librustc/dep_graph/graph.rs b/src/librustc/dep_graph/graph.rs
index 0a0dff05cb1..a9e80ddf4ba 100644
--- a/src/librustc/dep_graph/graph.rs
+++ b/src/librustc/dep_graph/graph.rs
@@ -638,7 +638,7 @@ impl DepGraph {
                             DepKind::Hir |
                             DepKind::HirBody |
                             DepKind::CrateMetadata => {
-                                if dep_node.extract_def_id(tcx).is_none() {
+                                if dep_dep_node.extract_def_id(tcx).is_none() {
                                     // If the node does not exist anymore, we
                                     // just fail to mark green.
                                     return None
diff --git a/src/test/incremental/change_name_of_static_in_fn.rs b/src/test/incremental/change_name_of_static_in_fn.rs
new file mode 100644
index 00000000000..5b27b6808ea
--- /dev/null
+++ b/src/test/incremental/change_name_of_static_in_fn.rs
@@ -0,0 +1,17 @@
+
+// revisions:rpass1 rpass2 rpass3
+
+// See issue #57692.
+
+#![allow(warnings)]
+
+fn main() {
+    #[cfg(rpass1)]
+    {
+        static map: u64 = 0;
+    }
+    #[cfg(not(rpass1))]
+    {
+        static MAP: u64 = 0;
+    }
+}