Be clear about the reverse transmute guarantees.

This commit is contained in:
Laurence Tratt 2020-08-12 15:47:37 +01:00
parent f5118a525f
commit 83f47aa11b

View file

@ -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
//!