Run formatter on alloc/src/boxed.rs · model-checking/verify-rust-std@8d01996 (original) (raw)
`@@ -839,7 +839,7 @@ impl<T, A: Allocator> Box<[T], A> {
`
839
839
`///
`
840
840
```` /// ```
`841`
`841`
`/// #![feature(allocator_api, new_uninit)]
`
`842`
``
`-
///
`
``
`842`
`+
///
`
`843`
`843`
`/// use std::alloc::System;
`
`844`
`844`
`///
`
`845`
`845`
`/// let mut values = Box::<[u32]>::try_new_uninit_slice(3, System)?;
`
`@@ -856,7 +856,10 @@ impl<T, A: Allocator> Box<[T], A> {
`
`856`
`856`
```` /// ```
857
857
`#[unstable(feature = "allocator_api", issue = "32838")]
`
858
858
`#[inline]
`
859
``
`-
pub fn try_new_uninit_slice_in(len: usize, alloc: A) -> Result<Box<[mem::MaybeUninit], A>, AllocError> {
`
``
859
`+
pub fn try_new_uninit_slice_in(
`
``
860
`+
len: usize,
`
``
861
`+
alloc: A,
`
``
862
`+
) -> Result<Box<[mem::MaybeUninit], A>, AllocError> {
`
860
863
`let ptr = if T::IS_ZST || len == 0 {
`
861
864
`NonNull::dangling()
`
862
865
`} else {
`
`@@ -879,7 +882,7 @@ impl<T, A: Allocator> Box<[T], A> {
`
879
882
`///
`
880
883
```` /// ```
````
881
884
`/// #![feature(allocator_api, new_uninit)]
`
882
``
`-
///
`
``
885
`+
///
`
883
886
`/// use std::alloc::System;
`
884
887
`///
`
885
888
`/// let values = Box::<[u32]>::try_new_zeroed_slice(3, System)?;
`
`@@ -892,7 +895,10 @@ impl<T, A: Allocator> Box<[T], A> {
`
892
895
`/// [zeroed]: mem::MaybeUninit::zeroed
`
893
896
`#[unstable(feature = "allocator_api", issue = "32838")]
`
894
897
`#[inline]
`
895
``
`-
pub fn try_new_zeroed_slice_in(len: usize, alloc: A) -> Result<Box<[mem::MaybeUninit], A>, AllocError> {
`
``
898
`+
pub fn try_new_zeroed_slice_in(
`
``
899
`+
len: usize,
`
``
900
`+
alloc: A,
`
``
901
`+
) -> Result<Box<[mem::MaybeUninit], A>, AllocError> {
`
896
902
`let ptr = if T::IS_ZST || len == 0 {
`
897
903
`NonNull::dangling()
`
898
904
`} else {
`