Sign in
rust
/
rust-lang
/
rust
/
refs/heads/lcnr/rustc-dev-guide
/
.
/
tests
/
ui
/
inference
/
iterator-sum-array-15673.rs
blob: c3d94415affdabd8392efd37aa717d80367fa1a1 [
file
] [
log
] [
blame
]
//! 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
>());
}