diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index 4391176c8be..8eb2caa60b1 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -269,7 +269,6 @@ impl Box { /// ``` /// #![feature(allocator_api, new_uninit)] /// - /// /// let mut five = Box::::try_new_uninit()?; /// /// let five = unsafe { @@ -284,6 +283,7 @@ impl Box { /// ``` #[unstable(feature = "allocator_api", issue = "32838")] // #[unstable(feature = "new_uninit", issue = "63291")] + #[inline] pub fn try_new_uninit() -> Result>, AllocError> { Box::try_new_uninit_in(Global) } @@ -309,6 +309,7 @@ impl Box { /// [zeroed]: mem::MaybeUninit::zeroed #[unstable(feature = "allocator_api", issue = "32838")] // #[unstable(feature = "new_uninit", issue = "63291")] + #[inline] pub fn try_new_zeroed() -> Result>, AllocError> { Box::try_new_zeroed_in(Global) } diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index 83032f7feee..5aaf521b4e0 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -557,7 +557,7 @@ impl Arc { /// # Ok::<(), std::alloc::AllocError>(()) /// ``` /// - /// [zeroed]: ../../std/mem/union.MaybeUninit.html#method.zeroed + /// [zeroed]: mem::MaybeUninit::zeroed #[unstable(feature = "allocator_api", issue = "32838")] // #[unstable(feature = "new_uninit", issue = "63291")] pub fn try_new_zeroed() -> Result>, AllocError> {