Skip to content

Commit

Permalink
More inline, doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Dec 31, 2020
1 parent 8f3cb7d commit 375e7c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ impl<T> Box<T> {
/// ```
/// #![feature(allocator_api, new_uninit)]
///
///
/// let mut five = Box::<u32>::try_new_uninit()?;
///
/// let five = unsafe {
Expand All @@ -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)
}
Expand All @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit 375e7c5

Please sign in to comment.