More inline, doc fixes
This commit is contained in:
parent
8f3cb7d75d
commit
375e7c5864
@ -269,7 +269,6 @@ pub fn try_new(x: T) -> Result<Self, AllocError> {
|
||||
/// ```
|
||||
/// #![feature(allocator_api, new_uninit)]
|
||||
///
|
||||
///
|
||||
/// let mut five = Box::<u32>::try_new_uninit()?;
|
||||
///
|
||||
/// let five = unsafe {
|
||||
@ -284,6 +283,7 @@ pub fn try_new(x: T) -> Result<Self, AllocError> {
|
||||
/// ```
|
||||
#[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 @@ pub fn try_new_uninit() -> Result<Box<mem::MaybeUninit<T>>, AllocError> {
|
||||
/// [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)
|
||||
}
|
||||
|
@ -557,7 +557,7 @@ pub fn try_new_uninit() -> Result<Arc<mem::MaybeUninit<T>>, 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 = "new_uninit", issue = "63291")]
|
||||
pub fn try_new_zeroed() -> Result<Arc<mem::MaybeUninit<T>>, AllocError> {
|
||||
|
Loading…
Reference in New Issue
Block a user