rust/library/core/src/slice
bors 9fa6b3c157 Auto merge of #99929 - the8472:default-iters, r=scottmcm
Implement Default for some alloc/core iterators

Add `Default` impls to the following collection iterators:

* slice::{Iter, IterMut}
* binary_heap::IntoIter
* btree::map::{Iter, IterMut, Keys, Values, Range, IntoIter, IntoKeys, IntoValues}
* btree::set::{Iter, IntoIter, Range}
* linked_list::IntoIter
* vec::IntoIter

and these adapters:

* adapters::{Chain, Cloned, Copied, Rev, Enumerate, Flatten, Fuse, Rev}

For iterators which are generic over allocators it only implements it for the global allocator because we can't conjure an allocator from nothing or would have to turn the allocator field into an `Option` just for this change.

These changes will be insta-stable.

ACP: https://github.com/rust-lang/libs-team/issues/77
2023-03-25 06:29:46 +00:00
..
iter rewrite iterator Default tests as doctests 2023-02-28 21:00:00 +01:00
ascii.rs EscapeAscii is not an ExactSizeIterator 2022-07-29 00:35:38 +00:00
cmp.rs Merge two different equality specialization traits in core 2023-03-01 14:42:06 -08:00
index.rs Use nuw when calculating slice lengths from Ranges 2023-03-05 15:15:22 -08:00
iter.rs Switch impls of is_sorted_by between slices and slice iters 2023-03-17 18:10:21 +00:00
memchr.rs Change 'from_bytes_until_nul' to const stable 2023-02-01 02:14:07 -05:00
mod.rs Switch impls of is_sorted_by between slices and slice iters 2023-03-17 18:10:21 +00:00
raw.rs Print the precondition we violated, and visible through output capture 2022-10-26 22:09:17 -04:00
rotate.rs Make ZST checks in core/alloc more readable 2022-09-22 23:12:29 -07:00
sort.rs Match unmatched backticks in library/ 2023-03-03 03:03:29 +01:00
specialize.rs Remove size_of == 1 case from fill specialization. 2021-08-09 19:25:28 +02:00