Skip to content

Commit 9121a73

Browse files
authored
Rollup merge of #61273 - RalfJung:maybe-uninit, r=Centril
mention that MaybeUninit is a bit like Option
2 parents 2d01c91 + 2bf80cf commit 9121a73

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libcore/mem.rs

+3
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,9 @@ impl<T: ?Sized> DerefMut for ManuallyDrop<T> {
966966
///
967967
/// The compiler then knows to not make any incorrect assumptions or optimizations on this code.
968968
///
969+
/// You can think of `MaybeUninit<T>` as being a bit like `Option<T>` but without
970+
/// any of the run-time tracking and without any of the safety checks.
971+
///
969972
/// ## out-pointers
970973
///
971974
/// You can use `MaybeUninit<T>` to implement "out-pointers": instead of returning data

0 commit comments

Comments
 (0)