rust/compiler/rustc_middle/src
Jubilee 9d5f794312
Rollup merge of #129401 - workingjubilee:partial-initialization-of-stabilization, r=dtolnay,joboet
Partially stabilize `feature(new_uninit)`

Finished comment period: https://github.com/rust-lang/rust/issues/63291#issuecomment-2183022955

The following API has been stabilized from https://github.com/rust-lang/rust/issues/63291

```rust
impl<T> Box<T> { pub fn new_uninit() -> Box<MaybeUninit<T>> {…} }
impl<T> Rc<T> { pub fn new_uninit() -> Rc<MaybeUninit<T>> {…} }
impl<T> Arc<T> { pub fn new_uninit() -> Arc<MaybeUninit<T>> {…} }

impl<T> Box<[T]> { pub fn new_uninit_slice(len: usize) -> Box<[MaybeUninit<T>]> {…} }
impl<T> Rc<[T]> { pub fn new_uninit_slice(len: usize) -> Rc<[MaybeUninit<T>]> {…} }
impl<T> Arc<[T]> { pub fn new_uninit_slice(len: usize) -> Arc<[MaybeUninit<T>]> {…} }

impl<T> Box<MaybeUninit<T>> { pub unsafe fn assume_init(self) -> Box<T> {…} }
impl<T> Box<[MaybeUninit<T>]> { pub unsafe fn assume_init(self) -> Box<[T]> {…} }
impl<T> Rc<MaybeUninit<T>> { pub unsafe fn assume_init(self) -> Rc<T> {…} }
impl<T> Rc<[MaybeUninit<T>]> { pub unsafe fn assume_init(self) -> Rc<[T]> {…} }
impl<T> Arc<MaybeUninit<T>> { pub unsafe fn assume_init(self) -> Arc<T> {…} }
impl<T> Arc<[MaybeUninit<T>]> { pub unsafe fn assume_init(self) -> Arc<[T]> {…} }
```

The remaining API is split between new issues
- `new_zeroed_alloc`: https://github.com/rust-lang/rust/issues/129396
- `box_uninit_write`: https://github.com/rust-lang/rust/issues/129397

All relevant code is thus either stabilized or split out of that issue, so this closes #63291 as, with the FCP concluded, that issue has served its purpose.

try-job: x86_64-rust-for-linux
2024-08-28 19:12:52 -07:00
..
dep_graph Reformat use declarations. 2024-07-29 08:26:52 +10:00
hir Stop using a special inner body for the coroutine by-move body for async closures 2024-08-26 18:44:19 -04:00
hooks Reformat use declarations. 2024-07-29 08:26:52 +10:00
infer Reformat use declarations. 2024-07-29 08:26:52 +10:00
middle Implement RFC 3525. 2024-08-28 09:54:23 +02:00
mir coverage: Rename CodeRegion to SourceRegion 2024-08-28 22:17:42 +10:00
query Implement RFC 3525. 2024-08-28 09:54:23 +02:00
thir rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
traits Detect * operator on !Sized expression 2024-08-08 17:35:40 +00:00
ty Auto merge of #127537 - veluca93:struct_tf, r=BoxyUwU 2024-08-28 22:54:55 +00:00
util Reformat use declarations. 2024-07-29 08:26:52 +10:00
arena.rs coverage: CodeRegion is never stored in an arena 2024-08-28 22:03:48 +10:00
error.rs Use bool in favor of Option<()> for diagnostics 2024-08-21 01:31:11 -04:00
lib.rs Rollup merge of #129401 - workingjubilee:partial-initialization-of-stabilization, r=dtolnay,joboet 2024-08-28 19:12:52 -07:00
lint.rs Only suggest #[allow] for --warn and --deny lint level flags 2024-08-08 13:09:58 +00:00
macros.rs lift_to_tcx -> lift_to_interner 2024-07-17 10:46:10 -04:00
metadata.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
tests.rs Give an item related to issue 27438 a more meaningful name 2024-04-30 22:27:19 +02:00
thir.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
values.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00