diff options
| -rw-r--r-- | library/core/src/cell.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs index fe5dd7be8f6..7bf32cb0d98 100644 --- a/library/core/src/cell.rs +++ b/library/core/src/cell.rs @@ -1816,6 +1816,8 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> { /// /// [`.get_mut()`]: `UnsafeCell::get_mut` /// +/// # Memory layout +/// /// `UnsafeCell<T>` 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<T>`. /// Special care has to be taken when converting a nested `T` inside of an `Outer<T>` type |
