summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-15673.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-15673.rs')
-rw-r--r--tests/ui/issues/issue-15673.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-15673.rs b/tests/ui/issues/issue-15673.rs
new file mode 100644
index 000000000..a8733d7f1
--- /dev/null
+++ b/tests/ui/issues/issue-15673.rs
@@ -0,0 +1,9 @@
+// run-pass
+#![allow(stable_features)]
+
+#![feature(iter_arith)]
+
+fn main() {
+ let x: [u64; 3] = [1, 2, 3];
+ assert_eq!(6, (0..3).map(|i| x[i]).sum::<u64>());
+}