rust/library/alloc/src
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
..
alloc run alloc benchmarks in Miri and fix UB 2022-11-07 10:34:04 +01:00
boxed ThinBox: Add intra-doc-links for Metadata 2023-01-20 08:07:45 +01:00
collections Auto merge of #99929 - the8472:default-iters, r=scottmcm 2023-03-25 06:29:46 +00:00
ffi Remove a couple of #[doc(hidden)] pub fn and their #[feature] gates 2023-02-10 08:06:35 +01:00
raw_vec Add a unit test for zero-sized types in RawVec. 2021-11-26 19:30:45 +11:00
rc Fix formatting of new Rc::into_inner test 2023-03-12 11:21:40 -07:00
slice Update rand in the stdlib tests, and remove the getrandom feature from it 2023-01-04 14:52:41 -08:00
sync Add Arc::into_inner for safely discarding Arcs without calling the destructor on the inner type. 2023-01-22 01:43:25 +09:00
testing Share testing utilities with non-btree test cases 2022-05-02 10:07:50 +02:00
vec Auto merge of #99929 - the8472:default-iters, r=scottmcm 2023-03-25 06:29:46 +00:00
alloc.rs Remove various double spaces in source comments. 2023-01-14 17:22:04 +01:00
borrow.rs Remove redundant lifetime bound from impl Borrow for Cow 2022-07-22 01:35:39 +02:00
boxed.rs Make unused_allocation lint warn against Box::new 2023-03-03 12:02:55 +00:00
fmt.rs Don't re-export private/unstable ArgumentV1 from alloc. 2023-01-29 20:15:02 +01:00
lib.rs Bump to latest beta 2023-03-15 08:55:22 -04:00
macros.rs Remove or justify use of #[rustc_box] 2023-02-27 20:54:55 -05:00
raw_vec.rs simplify layout calculations in rawvec 2023-01-22 22:13:17 +01:00
rc.rs Stabilize arc_into_inner and rc_into_inner. 2023-03-23 08:22:42 +09:00
slice.rs slice: Add a specialization for clone_into when T is Copy 2023-01-28 20:37:01 +01:00
str.rs Avoid unsafe code in to_ascii_[lower/upper]case() 2023-01-16 01:15:06 +02:00
string.rs Remove manual implementation of String::ne 2023-03-02 16:32:23 +01:00
sync.rs Stabilize arc_into_inner and rc_into_inner. 2023-03-23 08:22:42 +09:00
task.rs Document the conditional existence of alloc::sync and alloc::task. 2022-06-17 20:03:23 -07:00
tests.rs fix an alloc test 2023-03-03 17:47:48 +00:00