Skip to content

Commit fc3ba91

Browse files
joshlfRalfJung
andauthored
Update library/core/src/mem/maybe_uninit.rs
Co-authored-by: Ralf Jung <[email protected]>
1 parent 4db50aa commit fc3ba91

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/core/src/mem/maybe_uninit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ use crate::{fmt, intrinsics, ptr, slice};
259259
/// appropriate length, initialized or uninitialized, are a valid representation of `MaybeUninit<T>`.
260260
///
261261
/// However, "round-tripping" via `MaybeUninit` does not always result in the original value.
262+
/// `MaybeUninit` can have padding, and the contents of that padding are not preserved.
262263
/// Concretely, given distinct `T` and `U` where `size_of::<T>() == size_of::<U>()`, the following
263264
/// code is not guaranteed to be sound:
264265
///

0 commit comments

Comments
 (0)