From ce7689293b84a0309488b4a5d832ed2fa0d8bf0f Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 28 May 2019 18:04:37 +0200 Subject: [PATCH] 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 ce4aee7ebc54..058c01cdf100 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