From 90bb07eca6c40ab98d31401597ba3f6c50a70c92 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Wed, 6 Mar 2019 19:57:00 +0100 Subject: [PATCH] Apply suggestions from code review Co-Authored-By: RalfJung --- src/libcore/mem.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 4b5056c5adffa..2e82c8c77816c 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -1049,7 +1049,7 @@ impl DerefMut for ManuallyDrop { /// use std::mem::{self, MaybeUninit}; /// /// let x: &i32 = unsafe { mem::zeroed() }; // undefined behavior! -/// // equivalent code with `MaybeUninit<&i32>` +/// // The equivalent code with `MaybeUninit<&i32>`: /// let x: &i32 = unsafe { MaybeUninit::zeroed().into_initialized() }; // undefined behavior! /// ``` /// @@ -1078,7 +1078,7 @@ impl DerefMut for ManuallyDrop { /// use std::mem::{self, MaybeUninit}; /// /// let x: i32 = unsafe { mem::uninitialized() }; // undefined behavior! -/// // equivalent code with `MaybeUninit` +/// // The equivalent code with `MaybeUninit`: /// let x: i32 = unsafe { MaybeUninit::uninitialized().into_initialized() }; // undefined behavior! /// ``` /// (Notice that the rules around uninitialized integers are not finalized yet, but @@ -1231,7 +1231,7 @@ impl MaybeUninit { /// let x_vec = unsafe { &*x.as_ptr() }; /// // We have created a reference to an uninitialized vector! This is undefined behavior. /// ``` - /// (Notice that the rules around referenced to uninitialized data are not finalized yet, but + /// (Notice that the rules around references to uninitialized data are not finalized yet, but /// until they are, it is advisable to avoid them.) #[unstable(feature = "maybe_uninit", issue = "53491")] #[inline(always)]