diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 745b0f1ae8d47..c1837f79840d5 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -72,16 +72,19 @@ //! //! # Representation //! -//! Rust guarantees to optimise the following inner types such that an [`Option`] which contains -//! them has the same size as a pointer: +//! Rust guarantees to optimize the following types `` such that an +//! [`Option`] has the same size as `T`: //! +//! * [`Box`] //! * `&T` //! * `&mut T` //! * `extern "C" fn` //! * [`num::NonZero*`] //! * [`ptr::NonNull`] //! * `#[repr(transparent)]` struct around one of the types in this list. -//! * [`Box`] +//! +//! For the above cases, it is guaranteed that one can use [`mem::transmute`] +//! between `T` and `Option` and vice versa. //! //! # Examples //!