Skip to content

Commit 83f47aa

Browse files
committed
Be clear about the reverse transmute guarantees.
1 parent f5118a5 commit 83f47aa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

library/core/src/option.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@
8383
//! * [`ptr::NonNull<T>`]
8484
//! * `#[repr(transparent)]` struct around one of the types in this list.
8585
//!
86-
//! For the above cases, it is guaranteed that one can use [`mem::transmute`]
87-
//! between `T` and `Option<T>` and vice versa.
86+
//! For the above cases, it is guaranteed that one can [`mem::transmute`]
87+
//! from all valid values of `T` to `Option<T>` but only from non-`None`
88+
//! Option<T>` to `T`.
8889
//!
8990
//! # Examples
9091
//!

0 commit comments

Comments
 (0)