diff options
| author | Ralf Jung <post@ralfj.de> | 2019-05-28 18:04:37 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-05-28 18:04:37 +0200 |
| commit | ce7689293b84a0309488b4a5d832ed2fa0d8bf0f (patch) | |
| tree | a233208b49e2c2f2aedeee01b5bc636a14872922 | |
| parent | 7da118581c9dc839c8bf3fbb622bab9ce32bbf38 (diff) | |
| download | rust-ce7689293b84a0309488b4a5d832ed2fa0d8bf0f.tar.gz rust-ce7689293b84a0309488b4a5d832ed2fa0d8bf0f.zip | |
mention that MaybeUninit is a bit like Option
| -rw-r--r-- | src/libcore/mem.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index ce4aee7ebc5..058c01cdf10 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -966,6 +966,9 @@ impl<T: ?Sized> DerefMut for ManuallyDrop<T> { /// /// The compiler then knows to not make any incorrect assumptions or optimizations on this code. /// +/// You can think of `MaybeUninit<T>` and being a bit like `Option<T>` but without +/// any of the run-time tracking and without any of the safety checks. +/// /// ## out-pointers /// /// You can use `MaybeUninit<T>` to implement "out-pointers": instead of returning data |
