Be clearer about Some/None transmute.
This commit is contained in:
parent
83f47aa11b
commit
f3d7196cae
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
//!
|
||||
|
|
Loading…
Reference in a new issue