about summary refs log tree commit diff
path: root/src/test/ui/consts/const-eval
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2019-12-25 21:09:51 +0000
committerMatthew Jasper <mjjasper1@gmail.com>2019-12-25 21:09:51 +0000
commit5d19d4d894031c337e8b6d13802ebda622d30d23 (patch)
treee7319942b5c676f0ceb848135814baea46603227 /src/test/ui/consts/const-eval
parented33453a37d602f34cc40c205f9b9b8a8aff88b5 (diff)
downloadrust-5d19d4d894031c337e8b6d13802ebda622d30d23.tar.gz
rust-5d19d4d894031c337e8b6d13802ebda622d30d23.zip
Use the correct type for static qualifs
Diffstat (limited to 'src/test/ui/consts/const-eval')
-rw-r--r--src/test/ui/consts/const-eval/promote-static.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/consts/const-eval/promote-static.rs b/src/test/ui/consts/const-eval/promote-static.rs
new file mode 100644
index 00000000000..d3c663c53e9
--- /dev/null
+++ b/src/test/ui/consts/const-eval/promote-static.rs
@@ -0,0 +1,14 @@
+// regression test for #67609.
+
+// check-pass
+
+static NONE: Option<String> = None;
+
+static NONE_REF_REF: &&Option<String> = {
+    let x = &&NONE;
+    x
+};
+
+fn main() {
+    println!("{:?}", NONE_REF_REF);
+}