More inline, doc fixes

This commit is contained in:
Manish Goregaokar 2020-12-31 16:48:51 +00:00
parent 8f3cb7d75d
commit 375e7c5864
2 changed files with 3 additions and 2 deletions

View File

@ -269,7 +269,6 @@ impl<T> Box<T> {
/// ``` /// ```
/// #![feature(allocator_api, new_uninit)] /// #![feature(allocator_api, new_uninit)]
/// ///
///
/// let mut five = Box::<u32>::try_new_uninit()?; /// let mut five = Box::<u32>::try_new_uninit()?;
/// ///
/// let five = unsafe { /// let five = unsafe {
@ -284,6 +283,7 @@ impl<T> Box<T> {
/// ``` /// ```
#[unstable(feature = "allocator_api", issue = "32838")] #[unstable(feature = "allocator_api", issue = "32838")]
// #[unstable(feature = "new_uninit", issue = "63291")] // #[unstable(feature = "new_uninit", issue = "63291")]
#[inline]
pub fn try_new_uninit() -> Result<Box<mem::MaybeUninit<T>>, AllocError> { pub fn try_new_uninit() -> Result<Box<mem::MaybeUninit<T>>, AllocError> {
Box::try_new_uninit_in(Global) Box::try_new_uninit_in(Global)
} }
@ -309,6 +309,7 @@ impl<T> Box<T> {
/// [zeroed]: mem::MaybeUninit::zeroed /// [zeroed]: mem::MaybeUninit::zeroed
#[unstable(feature = "allocator_api", issue = "32838")] #[unstable(feature = "allocator_api", issue = "32838")]
// #[unstable(feature = "new_uninit", issue = "63291")] // #[unstable(feature = "new_uninit", issue = "63291")]
#[inline]
pub fn try_new_zeroed() -> Result<Box<mem::MaybeUninit<T>>, AllocError> { pub fn try_new_zeroed() -> Result<Box<mem::MaybeUninit<T>>, AllocError> {
Box::try_new_zeroed_in(Global) Box::try_new_zeroed_in(Global)
} }

View File

@ -557,7 +557,7 @@ impl<T> Arc<T> {
/// # Ok::<(), std::alloc::AllocError>(()) /// # Ok::<(), std::alloc::AllocError>(())
/// ``` /// ```
/// ///
/// [zeroed]: ../../std/mem/union.MaybeUninit.html#method.zeroed /// [zeroed]: mem::MaybeUninit::zeroed
#[unstable(feature = "allocator_api", issue = "32838")] #[unstable(feature = "allocator_api", issue = "32838")]
// #[unstable(feature = "new_uninit", issue = "63291")] // #[unstable(feature = "new_uninit", issue = "63291")]
pub fn try_new_zeroed() -> Result<Arc<mem::MaybeUninit<T>>, AllocError> { pub fn try_new_zeroed() -> Result<Arc<mem::MaybeUninit<T>>, AllocError> {