From ce7689293b84a0309488b4a5d832ed2fa0d8bf0f Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 28 May 2019 18:04:37 +0200 Subject: [PATCH 1/2] mention that MaybeUninit is a bit like Option --- src/libcore/mem.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index ce4aee7ebc54f..058c01cdf1007 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -966,6 +966,9 @@ impl DerefMut for ManuallyDrop { /// /// The compiler then knows to not make any incorrect assumptions or optimizations on this code. /// +/// You can think of `MaybeUninit` and being a bit like `Option` but without +/// any of the run-time tracking and without any of the safety checks. +/// /// ## out-pointers /// /// You can use `MaybeUninit` to implement "out-pointers": instead of returning data From 2bf80cf6ca3a9cb516216592e66b589e96839868 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 28 May 2019 18:20:24 +0200 Subject: [PATCH 2/2] Update src/libcore/mem.rs Co-Authored-By: Mazdak Farrokhzad --- src/libcore/mem.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 058c01cdf1007..40f4354213b40 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -966,7 +966,7 @@ impl DerefMut for ManuallyDrop { /// /// The compiler then knows to not make any incorrect assumptions or optimizations on this code. /// -/// You can think of `MaybeUninit` and being a bit like `Option` but without +/// You can think of `MaybeUninit` as being a bit like `Option` but without /// any of the run-time tracking and without any of the safety checks. /// /// ## out-pointers