rust/library/core/tests/iter/adapters
bors fa404339c9 Auto merge of #85528 - the8472:iter-markers, r=dtolnay
Implement iterator specialization traits on more adapters

This adds

* `TrustedLen` to `Skip` and `StepBy`
* `TrustedRandomAccess` to `Skip`
* `InPlaceIterable` and `SourceIter` to  `Copied` and `Cloned`

The first two might improve performance in the compiler itself since `skip` is used in several places. Constellations that would exercise the last point are probably rare since it would require an owning iterator that has references as Items somewhere in its iterator pipeline.

Improvements for `Skip`:

```
# old
test iter::bench_skip_trusted_random_access                     ... bench:       8,335 ns/iter (+/- 90)

# new
test iter::bench_skip_trusted_random_access                     ... bench:       2,753 ns/iter (+/- 27)
```
2024-01-21 11:17:46 +00:00
..
array_chunks.rs remove redundant imports 2023-12-10 10:56:22 +08:00
by_ref_sized.rs Properly forward ByRefSized::fold to the inner iterator 2022-08-14 22:55:30 -07:00
chain.rs apply fmt 2024-01-11 15:04:48 +03:00
cloned.rs library/core/test/iter add newlines between tests 2021-01-22 16:58:21 -05:00
copied.rs library/core/test/iter.rs split attempt 2 2021-01-21 19:36:32 -05:00
cycle.rs library/core/test/iter.rs split attempt 2 2021-01-21 19:36:32 -05:00
enumerate.rs replace advance_by returning usize with Result<(), NonZeroUsize> 2023-03-27 16:03:14 +02:00
filter.rs library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
filter_map.rs library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
flat_map.rs library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
flatten.rs apply fmt 2024-01-11 15:04:48 +03:00
fuse.rs library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
inspect.rs library/core/test/iter add newlines between tests 2021-01-22 16:58:21 -05:00
intersperse.rs eplace usages of vec![].into_iter with [].into_iter 2022-01-09 14:09:25 +11:00
map.rs library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
map_windows.rs Add Iterator::map_windows 2023-08-11 07:26:51 +08:00
mod.rs Add Iterator::map_windows 2023-08-11 07:26:51 +08:00
peekable.rs eplace usages of vec![].into_iter with [].into_iter 2022-01-09 14:09:25 +11:00
scan.rs library/core/test/iter.rs split attempt 2 2021-01-21 19:36:32 -05:00
skip.rs replace advance_by returning usize with Result<(), NonZeroUsize> 2023-03-27 16:03:14 +02:00
skip_while.rs library/core/test/iter add newlines between tests 2021-01-22 16:58:21 -05:00
step_by.rs Auto merge of #85528 - the8472:iter-markers, r=dtolnay 2024-01-21 11:17:46 +00:00
take.rs apply fmt 2024-01-11 15:04:48 +03:00
take_while.rs library/core/test/iter add newlines between tests 2021-01-22 16:58:21 -05:00
zip.rs apply fmt 2024-01-11 15:04:48 +03:00