Be clearer about Some/None transmute.

This commit is contained in:
Laurence Tratt 2020-08-12 15:53:58 +01:00
parent 83f47aa11b
commit f3d7196cae

View file

@ -84,8 +84,9 @@
//! * `#[repr(transparent)]` struct around one of the types in this list.
//!
//! 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`.
//! from all valid values of `T` to `Option<T>` but only from
//! `Option::Some(T)` to `T` (i.e. transmuting `None` to `<T>` is undefined
//! behaviour).
//!
//! # Examples
//!