about summary refs log tree commit diff
path: root/tests/ui/inference/iterator-sum-array-15673.rs
blob: c3d94415affdabd8392efd37aa717d80367fa1a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
//! Regression test for https://github.com/rust-lang/rust/issues/15673

//@ 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>());
}