Skip to content

Commit 007b2bf

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/mem/maybe_uninit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ use crate::{fmt, intrinsics, ptr, slice};
274274
/// ```
275275
///
276276
/// If the representation of `t` contains initialized bytes at byte offsets where `U` contains padding bytes, these
277-
/// may not be preserved in `MaybeUninit<U>`, and so `transmute(u)` may produce a `T` with
278-
/// uninitialized bytes in these positions. This is an active area of discussion, and this code
277+
/// may not be preserved in `MaybeUninit<U>`. Interpreting the representation of `u` at type `T` again (i.e., `transmute(u)` above) may thus
278+
/// be undefined behavior or yield a value different from `t` due to those bytes being lost. This is an active area of discussion, and this code
279279
/// may become sound in the future.
280280
281281
/// If byte offsets exists at which `T`'s representation does not permit uninitialized bytes but

0 commit comments

Comments
 (0)