summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-expr-in-fixed-length-vec.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/consts/const-expr-in-fixed-length-vec.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/consts/const-expr-in-fixed-length-vec.rs b/src/test/ui/consts/const-expr-in-fixed-length-vec.rs
new file mode 100644
index 000000000..a9960b455
--- /dev/null
+++ b/src/test/ui/consts/const-expr-in-fixed-length-vec.rs
@@ -0,0 +1,12 @@
+// run-pass
+// Check that constant expressions can be used for declaring the
+// type of a fixed length vector.
+
+// pretty-expanded FIXME #23616
+
+pub fn main() {
+
+ const FOO: usize = 2;
+ let _v: [isize; FOO*3];
+
+}