We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95de48b commit a55bf34Copy full SHA for a55bf34
core/src/mem/maybe_uninit.rs
@@ -351,6 +351,9 @@ impl<T> MaybeUninit<T> {
351
/// but `MaybeUninit<&'static i32>::zeroed()` is not because references must not
352
/// be null.
353
///
354
+ /// Note that if `T` has padding bytes, those bytes are *not* preserved when the
355
+ /// `MaybeUninit<T>` value is returned from this function, so those bytes will *not* be zeroed.
356
+ ///
357
/// Note that dropping a `MaybeUninit<T>` will never call `T`'s drop code.
358
/// It is your responsibility to make sure `T` gets dropped if it got initialized.
359
0 commit comments