Be clear about the reverse transmute
guarantees.
This commit is contained in:
parent
f5118a525f
commit
83f47aa11b
1 changed files with 3 additions and 2 deletions
|
@ -83,8 +83,9 @@
|
|||
//! * [`ptr::NonNull<T>`]
|
||||
//! * `#[repr(transparent)]` struct around one of the types in this list.
|
||||
//!
|
||||
//! For the above cases, it is guaranteed that one can use [`mem::transmute`]
|
||||
//! between `T` and `Option<T>` and vice versa.
|
||||
//! For the above cases, it is guaranteed that one can [`mem::transmute`]
|
||||
//! from all valid values of `T` to `Option<T>` but only from non-`None`
|
||||
//! Option<T>` to `T`.
|
||||
//!
|
||||
//! # Examples
|
||||
//!
|
||||
|
|
Loading…
Reference in a new issue