bors 9fbbe75fd7 Auto merge of #95602 - 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
..
2022-04-11 13:35:18 +08:00
2021-10-18 19:19:28 +09:00
2021-12-15 00:11:23 +08:00
2021-03-03 11:23:29 +01:00
2022-02-02 23:07:02 +09:00
2022-02-25 08:00:52 -05:00
2022-02-10 22:10:08 +00:00
2021-11-21 19:10:39 -08:00
2021-12-17 20:46:47 +08:00
2022-03-03 14:54:18 -05:00
2022-04-17 17:19:45 +00:00