Files
rust/library/coretests/tests
Jonathan Brouwer fb03f8462c Rollup merge of #159963 - Lfan-ke:feature/step-by-fused-iterator, r=jhpratt,dtolnay
core: implement FusedIterator for StepBy

Implements the accepted ACP rust-lang/libs-team#757.

`StepBy` yields no more items once its underlying iterator is exhausted, so it is fused whenever the underlying iterator is fused. `StepBy` was added in 1.28.0, just after the batch of `FusedIterator` impls stabilized in 1.26.0 (`Map`, `Skip`, `Take`, `Enumerate`, ...), so it was left out.

```rust
impl<I: FusedIterator> FusedIterator for StepBy<I> {}
```

This is insta-stable, matching the sibling adapter impls, so it needs a libs-api FCP.

Motivation from the ACP: crates with traits refined on top of `FusedIterator` (e.g. `range-set-blaze`'s `SortedStarts`) cannot cover `StepBy` today, even though it would always be valid.

A `test_step_by_fused` regression test is added.
2026-08-14 23:55:05 +02:00
..
2026-04-20 17:40:30 +02:00
2025-09-12 13:54:15 -05:00
2025-08-02 17:34:59 -04:00
2026-07-13 10:54:53 +02:00
2026-01-11 16:39:18 +03:00
2025-07-09 16:37:11 +00:00
2026-05-31 06:58:19 -07:00
2025-09-16 10:05:40 -05:00
2025-09-16 10:26:52 -05:00
2026-01-23 15:12:47 +07:00
2025-06-25 17:06:49 -07:00
2026-06-18 23:31:55 -04:00
2025-12-12 06:31:00 +02:00
2026-08-13 11:40:14 +10:00
…
…
…
2026-05-31 06:58:19 -07:00
2026-02-20 10:16:36 +01:00
…
2026-08-13 11:40:14 +10:00
2026-05-31 06:58:19 -07:00
…
2025-05-12 15:33:37 +02:00
2026-03-25 11:40:27 +07:00
2025-08-01 08:55:50 +03:00
…
…
2025-08-20 20:31:33 -04:00