Skip to content

Commit ce76892

Browse files
committed
mention that MaybeUninit is a bit like Option
1 parent 7da1185 commit ce76892

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>` and 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)