8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0e7d343 + a55bf34 commit fc53427Copy full SHA for fc53427
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