about summary refs log tree commit diff
path: root/tests/ui/consts/std/iter.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/std/iter.rs')
-rw-r--r--tests/ui/consts/std/iter.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/consts/std/iter.rs b/tests/ui/consts/std/iter.rs
new file mode 100644
index 00000000000..e9af781eb2b
--- /dev/null
+++ b/tests/ui/consts/std/iter.rs
@@ -0,0 +1,9 @@
+// run-pass
+
+const I: std::iter::Empty<u32> = std::iter::empty();
+
+fn main() {
+    for i in I {
+        panic!("magical value creation: {}", i);
+    }
+}