diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2024-08-21 22:32:03 -0700 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2024-08-23 20:52:02 -0700 |
| commit | 9ccd7abefeba2bde9e3366b5bb3985375fb0b8e6 (patch) | |
| tree | ac28c542d58b7306171ceb00a20e83f177289623 /library/alloc/src/rc.rs | |
| parent | a32d4a0e822a29a6682e08b75a8df4c29c7fa9f1 (diff) | |
| download | rust-9ccd7abefeba2bde9e3366b5bb3985375fb0b8e6.tar.gz rust-9ccd7abefeba2bde9e3366b5bb3985375fb0b8e6.zip | |
library: Move unstable API of new_uninit to new features
- `new_zeroed` variants move to `new_zeroed_alloc` - the `write` fn moves to `box_uninit_write` The remainder will be stabilized in upcoming patches, as it was decided to only stabilize `uninit*` and `assume_init`.
Diffstat (limited to 'library/alloc/src/rc.rs')
| -rw-r--r-- | library/alloc/src/rc.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index bdee06154fa..f153aa6d3be 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -539,6 +539,7 @@ impl<T> Rc<T> { /// # Examples /// /// ``` + /// #![feature(new_zeroed_alloc)] /// #![feature(new_uninit)] /// /// use std::rc::Rc; @@ -551,7 +552,7 @@ impl<T> Rc<T> { /// /// [zeroed]: mem::MaybeUninit::zeroed #[cfg(not(no_global_oom_handling))] - #[unstable(feature = "new_uninit", issue = "63291")] + #[unstable(feature = "new_zeroed_alloc", issue = "129396")] #[must_use] pub fn new_zeroed() -> Rc<mem::MaybeUninit<T>> { unsafe { @@ -1000,6 +1001,7 @@ impl<T> Rc<[T]> { /// /// ``` /// #![feature(new_uninit)] + /// #![feature(new_zeroed_alloc)] /// /// use std::rc::Rc; /// @@ -1011,7 +1013,7 @@ impl<T> Rc<[T]> { /// /// [zeroed]: mem::MaybeUninit::zeroed #[cfg(not(no_global_oom_handling))] - #[unstable(feature = "new_uninit", issue = "63291")] + #[unstable(feature = "new_zeroed_alloc", issue = "129396")] #[must_use] pub fn new_zeroed_slice(len: usize) -> Rc<[mem::MaybeUninit<T>]> { unsafe { |
