diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-08-10 19:45:48 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-10 19:45:48 +1000 |
| commit | 62b406d4b185f28828df3e0df6b1aa1f560145df (patch) | |
| tree | a3720e028c717f4136e1e555311c436c2a84aeb0 /tests/ui/inference/iterator-sum-array-15673.rs | |
| parent | 5955f005e53234b71f77d33040b973e6b9551db3 (diff) | |
| parent | 16765639b30741dde85da0dbcb44c343eb82b1a2 (diff) | |
| download | rust-62b406d4b185f28828df3e0df6b1aa1f560145df.tar.gz rust-62b406d4b185f28828df3e0df6b1aa1f560145df.zip | |
Rollup merge of #144403 - Kivooeo:issue4, r=jieyouxu
`tests/ui/issues/`: The Issues Strike Back [4/N] Some `tests/ui/issues/` housekeeping, to trim down number of tests directly under `tests/ui/issues/`. Part of https://github.com/rust-lang/rust/issues/133895. r? ````````@jieyouxu````````
Diffstat (limited to 'tests/ui/inference/iterator-sum-array-15673.rs')
| -rw-r--r-- | tests/ui/inference/iterator-sum-array-15673.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/inference/iterator-sum-array-15673.rs b/tests/ui/inference/iterator-sum-array-15673.rs new file mode 100644 index 00000000000..c3d94415aff --- /dev/null +++ b/tests/ui/inference/iterator-sum-array-15673.rs @@ -0,0 +1,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>()); +} |
