Rollup merge of #61273 - RalfJung:maybe-uninit, r=Centril

mention that MaybeUninit is a bit like Option
This commit is contained in:
Mazdak Farrokhzad 2019-05-29 00:20:06 +02:00 committed by GitHub
commit 9121a73ab1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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>` as 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