diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-12-20 12:37:05 +0100 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-12-26 22:50:17 +0100 |
| commit | 6b651b1a88024df0cda937445593fd360e457ad0 (patch) | |
| tree | ebd71bfca172e6466cf278b497e0d341c63c457a | |
| parent | a7a011d2fa97530f30ff2e7112c04723ba611152 (diff) | |
| download | rust-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.rs | 7 |
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 +} |
