rust/library/alloc/src
Kevin Reid 13fca73f49 Replace MaybeUninit::uninit_array() with array repeat expression.
This is possible now that inline const blocks are stable; the idea was
even mentioned as an alternative when `uninit_array()` was added:
<https://github.com/rust-lang/rust/pull/65580#issuecomment-544200681>

> if it’s stabilized soon enough maybe it’s not worth having a
> standard library method that will be replaceable with
> `let buffer = [MaybeUninit::<T>::uninit(); $N];`

Const array repetition and inline const blocks are now stable (in the
next release), so that circumstance has come to pass, and we no longer
have reason to want `uninit_array()` other than convenience. Therefore,
let’s evaluate the inconvenience by not using `uninit_array()` in
the standard library, before potentially deleting it entirely.
2024-06-24 10:23:50 -07:00
..
alloc run alloc benchmarks in Miri and fix UB 2022-11-07 10:34:04 +01:00
boxed Convert some module-level // and /// comments to //!. 2024-06-20 09:23:18 +10:00
collections Replace MaybeUninit::uninit_array() with array repeat expression. 2024-06-24 10:23:50 -07:00
ffi replace version placeholder 2024-06-11 16:52:02 +02:00
raw_vec try_with_capacity for RawVec 2024-03-01 18:20:48 +00:00
rc Generalize {Rc,Arc}::make_mut() to unsized types. 2024-06-22 08:08:00 -07:00
slice Revert panic_safe test changes 2024-06-17 22:05:35 +02:00
sync Fix some Arc allocator leaks 2024-01-28 18:33:34 +01:00
testing Share testing utilities with non-btree test cases 2022-05-02 10:07:50 +02:00
vec Replace MaybeUninit::uninit_array() with array repeat expression. 2024-06-24 10:23:50 -07:00
alloc.rs Replace WriteCloneIntoRaw with CloneToUninit. 2024-06-22 08:08:00 -07:00
borrow.rs Impl DerefPure for more std types 2024-04-05 00:02:42 +02:00
boxed.rs Replace WriteCloneIntoRaw with CloneToUninit. 2024-06-22 08:08:00 -07:00
fmt.rs Auto merge of #125012 - RalfJung:format-error, r=Mark-Simulacrum,workingjubilee 2024-05-12 08:34:32 +00:00
lib.miri.rs add 'x.py miri', and make it work for 'library/{core,alloc,std}' 2024-04-03 20:27:20 +02:00
lib.rs Replace MaybeUninit::uninit_array() with array repeat expression. 2024-06-24 10:23:50 -07:00
macros.rs Update doc for alloc::format! and core::concat! 2023-09-06 15:11:21 +02:00
raw_vec.rs Avoid more NonNull-raw-NonNull roundtrips in Vec 2024-04-12 18:14:29 -04:00
rc.rs Generalize {Rc,Arc}::make_mut() to unsized types. 2024-06-22 08:08:00 -07:00
slice.rs Fix wrong big O star bracing in the doc comments 2024-06-20 18:07:04 +02:00
str.rs fix #124714 str.to_lowercase sigma handling 2024-05-08 17:05:10 +02:00
string.rs Auto merge of #99969 - calebsander:feature/collect-box-str, r=dtolnay 2024-05-19 02:13:06 +00:00
sync.rs Generalize {Rc,Arc}::make_mut() to unsized types. 2024-06-22 08:08:00 -07:00
task.rs lib: fix some unnecessary_cast clippy lint 2024-03-25 23:19:40 +03:00
tests.rs remove redundant imports 2023-12-10 10:56:22 +08:00