about summary refs log tree commit diff
path: root/tests/ui/static/static-vec-repeat-not-constant.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/static/static-vec-repeat-not-constant.rs')
-rw-r--r--tests/ui/static/static-vec-repeat-not-constant.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/static/static-vec-repeat-not-constant.rs b/tests/ui/static/static-vec-repeat-not-constant.rs
new file mode 100644
index 00000000000..61c87b144d9
--- /dev/null
+++ b/tests/ui/static/static-vec-repeat-not-constant.rs
@@ -0,0 +1,6 @@
+fn foo() -> isize { 23 }
+
+static a: [isize; 2] = [foo(); 2];
+//~^ ERROR: E0015
+
+fn main() {}