about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAljoscha Meyer <AljoschaMeyer@users.noreply.github.com>2024-07-06 19:13:53 +0200
committerGitHub <noreply@github.com>2024-07-06 19:13:53 +0200
commit497ef498053be7e6ef9e8af1bf7dc1e8800674c1 (patch)
treee49d8a597af6f5f136debc19b9f498efea83976f
parent6b5da82d12a81e4905a9e01a33d4831fe6fea9ec (diff)
downloadrust-497ef498053be7e6ef9e8af1bf7dc1e8800674c1.tar.gz
rust-497ef498053be7e6ef9e8af1bf7dc1e8800674c1.zip
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.
-rw-r--r--library/alloc/src/boxed.rs4
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]);