about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2019-01-17 15:32:05 +0100
committerMichael Woerister <michaelwoerister@posteo>2019-01-17 15:32:05 +0100
commit3884cc8df480eba9bb8d19fa46e9fe6c9f9d729b (patch)
treea073bb8e672cde73de0be5183c6ee5935728e00b /src
parent659994627234ce7d95a1a52ad8756ce661059adf (diff)
downloadrust-3884cc8df480eba9bb8d19fa46e9fe6c9f9d729b.tar.gz
rust-3884cc8df480eba9bb8d19fa46e9fe6c9f9d729b.zip
Fix typo bug in DepGraph::try_mark_green().
Diffstat (limited to 'src')
-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 501ef01d74c..7384af108ed 100644
--- a/src/librustc/dep_graph/graph.rs
+++ b/src/librustc/dep_graph/graph.rs
@@ -600,7 +600,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;
+    }
+}