rust/library/core
bors 9fbbe75fd7 Auto merge of - scottmcm:faster-array-intoiter-fold, r=the8472
Fix `array::IntoIter::fold` to use the optimized `Range::fold`

It was using `Iterator::by_ref` in the implementation, which ended up pessimizing it enough that, for example, it didn't vectorize when we tried it in the <https://rust-lang.zulipchat.com/#narrow/stream/257879-project-portable-simd/topic/Reducing.20sum.20into.20wider.20types> conversation.

Demonstration that the codegen test doesn't pass on the current nightly: <https://rust.godbolt.org/z/Taxev5eMn>
2022-05-14 03:12:53 +00:00
..
benches Auto merge of - thomcc:rand-bump, r=m-ou-se 2022-05-05 05:08:44 +00:00
primitive_docs
src Auto merge of - scottmcm:faster-array-intoiter-fold, r=the8472 2022-05-14 03:12:53 +00:00
tests Auto merge of - scottmcm:faster-array-intoiter-fold, r=the8472 2022-05-14 03:12:53 +00:00
Cargo.toml Avoid use of rand::thread_rng in stdlib benchmarks 2022-05-02 00:08:21 -07:00