diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-12-31 16:48:51 +0000 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2020-12-31 16:49:44 +0000 |
| commit | 375e7c58644d1f7959bfd33caf455d6aa34cc326 (patch) | |
| tree | 8f6471ef81c0659b3a3ff17461193de43e1bac25 | |
| parent | 8f3cb7d75d0271066a11502d331333dc804e5d14 (diff) | |
| download | rust-375e7c58644d1f7959bfd33caf455d6aa34cc326.tar.gz rust-375e7c58644d1f7959bfd33caf455d6aa34cc326.zip | |
More inline, doc fixes
| -rw-r--r-- | library/alloc/src/boxed.rs | 3 | ||||
| -rw-r--r-- | library/alloc/src/sync.rs | 2 |
2 files changed, 3 insertions, 2 deletions
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<T> Box<T> { /// ``` /// #![feature(allocator_api, new_uninit)] /// - /// /// let mut five = Box::<u32>::try_new_uninit()?; /// /// let five = unsafe { @@ -284,6 +283,7 @@ impl<T> Box<T> { /// ``` #[unstable(feature = "allocator_api", issue = "32838")] // #[unstable(feature = "new_uninit", issue = "63291")] + #[inline] pub fn try_new_uninit() -> Result<Box<mem::MaybeUninit<T>>, AllocError> { Box::try_new_uninit_in(Global) } @@ -309,6 +309,7 @@ impl<T> Box<T> { /// [zeroed]: mem::MaybeUninit::zeroed #[unstable(feature = "allocator_api", issue = "32838")] // #[unstable(feature = "new_uninit", issue = "63291")] + #[inline] pub fn try_new_zeroed() -> Result<Box<mem::MaybeUninit<T>>, 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<T> Arc<T> { /// # 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<Arc<mem::MaybeUninit<T>>, AllocError> { |
