summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-expr-in-vec-repeat.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/const-expr-in-vec-repeat.rs')
-rw-r--r--tests/ui/consts/const-expr-in-vec-repeat.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/consts/const-expr-in-vec-repeat.rs b/tests/ui/consts/const-expr-in-vec-repeat.rs
new file mode 100644
index 000000000..4eaef2505
--- /dev/null
+++ b/tests/ui/consts/const-expr-in-vec-repeat.rs
@@ -0,0 +1,11 @@
+// run-pass
+// Check that constant expressions can be used in vec repeat syntax.
+
+// pretty-expanded FIXME #23616
+
+pub fn main() {
+
+ const FOO: usize = 2;
+ let _v = [0; FOO*3*2/2];
+
+}