rust/library/alloc/src
bors 116d1a7056 Auto merge of #80824 - cuviper:heap-clones, r=kennytm
Try to avoid locals when cloning into Box/Rc/Arc

For generic `T: Clone`, we can allocate an uninitialized box beforehand,
which gives the optimizer a chance to create the clone directly in the
heap. For `T: Copy`, we can go further and do a simple memory copy,
regardless of optimization level.

The same applies to `Rc`/`Arc::make_mut` when they must clone the data.
2021-01-13 11:11:34 +00:00
..
alloc Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
collections Add another test case for #79808 2021-01-11 12:10:16 +09:00
prelude mv std libs to library/ 2020-07-27 19:51:13 -05:00
raw_vec Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
rc de-stabilize unsized raw ptr methods for Weak 2020-12-28 00:39:09 +01:00
sync de-stabilize unsized raw ptr methods for Weak 2020-12-28 00:39:09 +01:00
vec Add comment to Vec::truncate explaining > vs >= 2021-01-09 12:35:47 -08:00
alloc.rs move WriteCloneIntoRaw into alloc::alloc 2021-01-12 12:24:28 -08:00
borrow.rs Mention Arc::make_mut and Rc::make_mut in the documentation of Cow 2020-12-28 17:13:28 +01:00
boxed.rs move WriteCloneIntoRaw into alloc::alloc 2021-01-12 12:24:28 -08:00
fmt.rs Convert a bunch of intra-doc links 2020-11-07 12:50:57 -08:00
lib.rs remove incomplete features from std 2021-01-01 19:57:10 +01:00
macros.rs doc: apply suggestions 2020-12-11 10:09:40 -05:00
raw_vec.rs Auto merge of #78682 - glandium:issue78471, r=lcnr 2020-12-15 06:32:10 +00:00
rc.rs move WriteCloneIntoRaw into alloc::alloc 2021-01-12 12:24:28 -08:00
slice.rs Replace the tracking issue for the slice_group_by feature 2020-12-31 12:13:03 +01:00
str.rs Remove many unnecessary manual link resolves from library 2020-12-31 11:54:32 -08:00
string.rs Add "length" as doc alias to len methods 2020-12-28 09:13:46 +01:00
sync.rs move WriteCloneIntoRaw into alloc::alloc 2021-01-12 12:24:28 -08:00
task.rs Allow unstable From impl for [Raw]Waker. 2020-09-11 13:36:45 +02:00
tests.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00