Files
Jacob Pratt 666e69ea0e Rollup merge of #156737 - asder8215:double_ended_iterator_next_chunk_back, r=aapoalas
Implement `DoubleEndedIterator::next_chunk_back`

This PR builds off on @vinDelphini's [PR](https://github.com/rust-lang/rust/pull/151668) on introducing `DoubleEndedIterator::next_chunk_back` (which will be used in a follow up PR to optimize `ArrayChunks::try_rfold` once merged). This was in the works since late Jan and I thought to pick it up and get this over the finish line as vinDelphini has been away from the PR for a couple of months. I've made sure to pull from vinDelphini's branch to keep him authored on the commits he made.

Other things introduced from this PR is specialization like done for `Iterator::next_chunk`, constifying some stuff, making a custom `DoubleEndedIterator::next_chunk_back` for `IntoIter` (since it also has a custom impl of `Iterator::next_chunk`), and a bunch of tests mirroring that of `Iterator::next_chunk`.

There's no tracking issue for this yet, but the ACP for this introduction is [here](https://github.com/rust-lang/libs-team/issues/734). I'll create the tracking issue for this soon.

----

Actually, can we have `DoubleEndedIterator::next_chunk_back` underneath [`Iterator::next_chunk` tracking issue](https://github.com/rust-lang/rust/issues/98326)?
2026-07-01 17:42:23 -04:00
..