diff options
| author | Pointerbender <pointerbender@gmail.com> | 2022-09-12 11:12:28 +0200 |
|---|---|---|
| committer | Pointerbender <pointerbender@gmail.com> | 2022-09-12 11:12:28 +0200 |
| commit | 302e33fde2785874c6b85aa9760e8e6be2e7dad4 (patch) | |
| tree | 1ec675cdbb2c7d96be39e2ba21e768e00ccfeee8 | |
| parent | 56e7678ca97e9740f7d09206f767d5bb676917f7 (diff) | |
| download | rust-302e33fde2785874c6b85aa9760e8e6be2e7dad4.tar.gz rust-302e33fde2785874c6b85aa9760e8e6be2e7dad4.zip | |
add description of the memory layout for `UnsafeCell<T>`
| -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 fb4454c94cb..cce4e5a5946 100644 --- a/library/core/src/cell.rs +++ b/library/core/src/cell.rs @@ -1811,6 +1811,8 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> { /// /// [`.get_mut()`]: `UnsafeCell::get_mut` /// +/// `UnsafeCell<T>` has the same in-memory representation as its inner type `T`. +/// /// # Examples /// /// Here is an example showcasing how to soundly mutate the contents of an `UnsafeCell<_>` despite |
