@@ -1049,7 +1049,7 @@ impl<T: ?Sized> DerefMut for ManuallyDrop<T> {
1049
1049
/// use std::mem::{self, MaybeUninit};
1050
1050
///
1051
1051
/// let x: &i32 = unsafe { mem::zeroed() }; // undefined behavior!
1052
- /// // equivalent code with `MaybeUninit<&i32>`
1052
+ /// // The equivalent code with `MaybeUninit<&i32>`:
1053
1053
/// let x: &i32 = unsafe { MaybeUninit::zeroed().into_initialized() }; // undefined behavior!
1054
1054
/// ```
1055
1055
///
@@ -1078,7 +1078,7 @@ impl<T: ?Sized> DerefMut for ManuallyDrop<T> {
1078
1078
/// use std::mem::{self, MaybeUninit};
1079
1079
///
1080
1080
/// let x: i32 = unsafe { mem::uninitialized() }; // undefined behavior!
1081
- /// // equivalent code with `MaybeUninit<i32>`
1081
+ /// // The equivalent code with `MaybeUninit<i32>`:
1082
1082
/// let x: i32 = unsafe { MaybeUninit::uninitialized().into_initialized() }; // undefined behavior!
1083
1083
/// ```
1084
1084
/// (Notice that the rules around uninitialized integers are not finalized yet, but
@@ -1231,7 +1231,7 @@ impl<T> MaybeUninit<T> {
1231
1231
/// let x_vec = unsafe { &*x.as_ptr() };
1232
1232
/// // We have created a reference to an uninitialized vector! This is undefined behavior.
1233
1233
/// ```
1234
- /// (Notice that the rules around referenced to uninitialized data are not finalized yet, but
1234
+ /// (Notice that the rules around references to uninitialized data are not finalized yet, but
1235
1235
/// until they are, it is advisable to avoid them.)
1236
1236
#[ unstable( feature = "maybe_uninit" , issue = "53491" ) ]
1237
1237
#[ inline( always) ]
0 commit comments