rust/src/liballoc
bors 4a95e9704d Auto merge of #61953 - Centril:shared-from-iter, r=RalfJung
Add `impl<T> FromIterator<T> for Arc/Rc<[T]>`

Add implementations of `FromIterator<T> for Arc/Rc<[T]>` with symmetrical logic.

This also takes advantage of specialization in the case of iterators with known length (`TrustedLen`) to elide the final allocation/copying from a `Vec<T>` into `Rc<[T]>` because we can allocate the space for the `Rc<[T]>` directly when the size is known. This is the primary motivation and why this is to be preferred over `iter.collect::<Vec<_>>().into(): Rc<[T]>`.

Moreover, this PR does some refactoring in some places.

r? @RalfJung for the code
cc @alexcrichton from T-libs
2019-07-13 06:49:02 +00:00
..
benches improve worst-case performance of BTreeSet difference and intersection 2019-03-29 12:18:20 +01:00
collections Rollup merge of #62123 - jeremystucki:needless_lifetimes_std, r=alexcrichton 2019-07-05 13:52:58 +02:00
prelude Replace SliceConcatExt trait with inherent methods and SliceConcat helper trait 2019-07-05 11:49:30 +02:00
tests Auto merge of #61953 - Centril:shared-from-iter, r=RalfJung 2019-07-13 06:49:02 +00:00
alloc.rs Switch master to 1.38 2019-07-04 11:26:57 -04:00
borrow.rs warn(missing_docs) in liballoc, and add missing docs 2019-04-15 16:35:50 +02:00
boxed.rs Add tracking issue for Box::into_pin 2019-07-04 12:57:34 +02:00
Cargo.toml Update the compiler_builtins crate 2019-05-17 07:17:15 -07:00
fmt.rs Make clear that format padding doesn't work for Debug 2019-04-13 15:39:49 +10:00
lib.rs Auto merge of #61953 - Centril:shared-from-iter, r=RalfJung 2019-07-13 06:49:02 +00:00
macros.rs Hygienize macros in the standard library 2019-06-12 20:27:29 +03:00
raw_vec.rs avoid materializing unintialized Boxes in RawVec 2019-05-27 11:15:31 +03:00
rc.rs Auto merge of #61953 - Centril:shared-from-iter, r=RalfJung 2019-07-13 06:49:02 +00:00
slice.rs Replace SliceConcatExt trait with inherent methods and SliceConcat helper trait 2019-07-05 11:49:30 +02:00
str.rs Replace SliceConcatExt trait with inherent methods and SliceConcat helper trait 2019-07-05 11:49:30 +02:00
string.rs Rollup merge of #62123 - jeremystucki:needless_lifetimes_std, r=alexcrichton 2019-07-05 13:52:58 +02:00
sync.rs Auto merge of #61953 - Centril:shared-from-iter, r=RalfJung 2019-07-13 06:49:02 +00:00
tests.rs Separate liballoc module 2019-06-16 13:08:09 +03:00
vec.rs Auto merge of #61224 - aloucks:drain_filter, r=Gankro 2019-07-08 22:03:26 +00:00