diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs index fe5dd7be8f6b..7bf32cb0d98f 100644 --- a/library/core/src/cell.rs +++ b/library/core/src/cell.rs @@ -1816,6 +1816,8 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { /// /// [`.get_mut()`]: `UnsafeCell::get_mut` /// +/// # Memory layout +/// /// `UnsafeCell` has the same in-memory representation as its inner type `T`. A consequence /// of this guarantee is that it is possible to convert between `T` and `UnsafeCell`. /// Special care has to be taken when converting a nested `T` inside of an `Outer` type