Skip to content

Commit 90bb07e

Browse files
CentrilRalfJung
andauthored
Apply suggestions from code review
Co-Authored-By: RalfJung <[email protected]>
1 parent 6d32e5a commit 90bb07e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libcore/mem.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ impl<T: ?Sized> DerefMut for ManuallyDrop<T> {
10491049
/// use std::mem::{self, MaybeUninit};
10501050
///
10511051
/// let x: &i32 = unsafe { mem::zeroed() }; // undefined behavior!
1052-
/// // equivalent code with `MaybeUninit<&i32>`
1052+
/// // The equivalent code with `MaybeUninit<&i32>`:
10531053
/// let x: &i32 = unsafe { MaybeUninit::zeroed().into_initialized() }; // undefined behavior!
10541054
/// ```
10551055
///
@@ -1078,7 +1078,7 @@ impl<T: ?Sized> DerefMut for ManuallyDrop<T> {
10781078
/// use std::mem::{self, MaybeUninit};
10791079
///
10801080
/// let x: i32 = unsafe { mem::uninitialized() }; // undefined behavior!
1081-
/// // equivalent code with `MaybeUninit<i32>`
1081+
/// // The equivalent code with `MaybeUninit<i32>`:
10821082
/// let x: i32 = unsafe { MaybeUninit::uninitialized().into_initialized() }; // undefined behavior!
10831083
/// ```
10841084
/// (Notice that the rules around uninitialized integers are not finalized yet, but
@@ -1231,7 +1231,7 @@ impl<T> MaybeUninit<T> {
12311231
/// let x_vec = unsafe { &*x.as_ptr() };
12321232
/// // We have created a reference to an uninitialized vector! This is undefined behavior.
12331233
/// ```
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
12351235
/// until they are, it is advisable to avoid them.)
12361236
#[unstable(feature = "maybe_uninit", issue = "53491")]
12371237
#[inline(always)]

0 commit comments

Comments
 (0)