diff options
| author | Jubilee <workingjubilee@gmail.com> | 2024-08-28 19:12:52 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-28 19:12:52 -0700 |
| commit | 9d5f7943122e7f09fbeaba29147b0a9e7d2716fe (patch) | |
| tree | 208fbee4588122c6b451fc5cbae8d8f9b0f5a3dc /compiler/rustc_middle/src/lib.rs | |
| parent | fcb6b7792d79a037935757ec4e15bb5a44ff6524 (diff) | |
| parent | 605d9cf3b5f77f3f46d333347b21ab18697b75c6 (diff) | |
| download | rust-9d5f7943122e7f09fbeaba29147b0a9e7d2716fe.tar.gz rust-9d5f7943122e7f09fbeaba29147b0a9e7d2716fe.zip | |
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
Diffstat (limited to 'compiler/rustc_middle/src/lib.rs')
| -rw-r--r-- | compiler/rustc_middle/src/lib.rs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index ce330b4744b..32f79ff7234 100644 --- a/compiler/rustc_middle/src/lib.rs +++ b/compiler/rustc_middle/src/lib.rs @@ -53,7 +53,6 @@ #![feature(min_specialization)] #![feature(negative_impls)] #![feature(never_type)] -#![feature(new_uninit)] #![feature(ptr_alignment_type)] #![feature(rustc_attrs)] #![feature(rustdoc_internals)] |
