diff options
| -rw-r--r-- | library/alloc/src/boxed.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index 847594103d5..322c0756abd 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -842,7 +842,7 @@ impl<T, A: Allocator> Box<[T], A> { /// /// use std::alloc::System; /// - /// let mut values = Box::<[u32]>::try_new_uninit_slice_in(3, System)?; + /// let mut values = Box::<[u32], _>::try_new_uninit_slice_in(3, System)?; /// let values = unsafe { /// // Deferred initialization: /// values[0].as_mut_ptr().write(1); @@ -885,7 +885,7 @@ impl<T, A: Allocator> Box<[T], A> { /// /// use std::alloc::System; /// - /// let values = Box::<[u32]>::try_new_zeroed_slice_in(3, System)?; + /// let values = Box::<[u32], _>::try_new_zeroed_slice_in(3, System)?; /// let values = unsafe { values.assume_init() }; /// /// assert_eq!(*values, [0, 0, 0]); |
