Skip to content

Commit ca537d2

Browse files
Fix them doc examples some more
Apologies for the many attempts, my dev loop for this consists of editing on github, committing, and then waiting for the CI failure log to yell at me.
1 parent be23cef commit ca537d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

alloc/src/boxed.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ impl<T, A: Allocator> Box<[T], A> {
842842
///
843843
/// use std::alloc::System;
844844
///
845-
/// let mut values = Box::<[u32]>::try_new_uninit_slice_in(3, System)?;
845+
/// let mut values = Box::<[u32], _>::try_new_uninit_slice_in(3, System)?;
846846
/// let values = unsafe {
847847
/// // Deferred initialization:
848848
/// values[0].as_mut_ptr().write(1);
@@ -885,7 +885,7 @@ impl<T, A: Allocator> Box<[T], A> {
885885
///
886886
/// use std::alloc::System;
887887
///
888-
/// let values = Box::<[u32]>::try_new_zeroed_slice_in(3, System)?;
888+
/// let values = Box::<[u32], _>::try_new_zeroed_slice_in(3, System)?;
889889
/// let values = unsafe { values.assume_init() };
890890
///
891891
/// assert_eq!(*values, [0, 0, 0]);

0 commit comments

Comments
 (0)