Skip to content

Commit d8b6f6a

Browse files
authored
Rollup merge of rust-lang#61161 - RalfJung:maybe-uninit, r=Centril
MaybeUninit doctest: remove unnecessary type ascription
2 parents 46ec85a + 72145ea commit d8b6f6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/mem.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ impl<T: ?Sized> DerefMut for ManuallyDrop<T> {
982982
/// out.write(vec![1, 2, 3]);
983983
/// }
984984
///
985-
/// let mut v: MaybeUninit<Vec<i32>> = MaybeUninit::uninit();
985+
/// let mut v = MaybeUninit::uninit();
986986
/// unsafe { make_vec(v.as_mut_ptr()); }
987987
/// // Now we know `v` is initialized! This also makes sure the vector gets
988988
/// // properly dropped.
@@ -1071,7 +1071,7 @@ impl<T: ?Sized> DerefMut for ManuallyDrop<T> {
10711071
/// optimizations, potentially resulting in a larger size:
10721072
///
10731073
/// ```rust
1074-
/// # use std::mem::{MaybeUninit, size_of, align_of};
1074+
/// # use std::mem::{MaybeUninit, size_of};
10751075
/// assert_eq!(size_of::<Option<bool>>(), 1);
10761076
/// assert_eq!(size_of::<Option<MaybeUninit<bool>>>(), 2);
10771077
/// ```

0 commit comments

Comments
 (0)