summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/issue-29914-3.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/issue-29914-3.rs')
-rw-r--r--tests/ui/consts/issue-29914-3.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/consts/issue-29914-3.rs b/tests/ui/consts/issue-29914-3.rs
new file mode 100644
index 000000000..1c6c64eb3
--- /dev/null
+++ b/tests/ui/consts/issue-29914-3.rs
@@ -0,0 +1,7 @@
+// run-pass
+const ARR: [usize; 5] = [5, 4, 3, 2, 1];
+const BLA: usize = ARR[ARR[3]];
+
+fn main() {
+ assert_eq!(3, BLA);
+}