Fix them doc examples some more · model-checking/verify-rust-std@ca537d2 (original) (raw)
`@@ -842,7 +842,7 @@ impl<T, A: Allocator> Box<[T], A> {
`
842
842
`///
`
843
843
`/// use std::alloc::System;
`
844
844
`///
`
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)?;
`
846
846
`/// let values = unsafe {
`
847
847
`/// // Deferred initialization:
`
848
848
`/// values[0].as_mut_ptr().write(1);
`
`@@ -885,7 +885,7 @@ impl<T, A: Allocator> Box<[T], A> {
`
885
885
`///
`
886
886
`/// use std::alloc::System;
`
887
887
`///
`
888
``
`-
/// let values = Box::<[u32]>::try_new_zeroed_slice_in(3, System)?;
`
``
888
`+
/// let values = Box::<[u32], _>::try_new_zeroed_slice_in(3, System)?;
`
889
889
`/// let values = unsafe { values.assume_init() };
`
890
890
`///
`
891
891
`/// assert_eq!(*values, [0, 0, 0]);
`