2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-08-31 08:02:01 -05:00
|
|
|
#![allow(stable_features)]
|
|
|
|
|
2015-06-10 15:33:52 -05:00
|
|
|
#![feature(iter_arith)]
|
2015-03-05 20:33:58 -06:00
|
|
|
|
2014-10-02 14:52:06 -05:00
|
|
|
fn main() {
|
2014-12-19 20:20:51 -06:00
|
|
|
let x: [u64; 3] = [1, 2, 3];
|
2015-04-06 10:43:50 -05:00
|
|
|
assert_eq!(6, (0..3).map(|i| x[i]).sum::<u64>());
|
2014-10-02 14:52:06 -05:00
|
|
|
}
|