Skip to content

Commit

Permalink
Be clear about the reverse transmute guarantees.
Browse files Browse the repository at this point in the history
  • Loading branch information
ltratt committed Aug 12, 2020
1 parent f5118a5 commit 83f47aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions library/core/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
//!
Expand Down

0 comments on commit 83f47aa

Please sign in to comment.