about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2019-12-20 12:37:05 +0100
committerOliver Scherer <github35764891676564198441@oli-obk.de>2019-12-26 22:50:17 +0100
commit6b651b1a88024df0cda937445593fd360e457ad0 (patch)
treeebd71bfca172e6466cf278b497e0d341c63c457a
parenta7a011d2fa97530f30ff2e7112c04723ba611152 (diff)
downloadrust-6b651b1a88024df0cda937445593fd360e457ad0.tar.gz
rust-6b651b1a88024df0cda937445593fd360e457ad0.zip
Add regression test for ZST statics being allowed to "read" from themselves
-rw-r--r--src/test/ui/consts/recursive-zst-static.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/consts/recursive-zst-static.rs b/src/test/ui/consts/recursive-zst-static.rs
new file mode 100644
index 00000000000..df7562bd9f5
--- /dev/null
+++ b/src/test/ui/consts/recursive-zst-static.rs
@@ -0,0 +1,7 @@
+// build-pass
+
+static FOO: () = FOO;
+
+fn main() {
+    FOO
+}