about summary refs log tree commit diff
path: root/library/core/src/cell.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/core/src/cell.rs')
-rw-r--r--library/core/src/cell.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs
index 897d03595d7..9d1720acf36 100644
--- a/library/core/src/cell.rs
+++ b/library/core/src/cell.rs
@@ -209,6 +209,12 @@ pub use once::OnceCell;
 
 /// A mutable memory location.
 ///
+/// # Memory layout
+///
+/// `Cell<T>` has the same [memory layout and caveats as
+/// `UnsafeCell<T>`](UnsafeCell#memory-layout). In particular, this means that
+/// `Cell<T>` has the same in-memory representation as its inner type `T`.
+///
 /// # Examples
 ///
 /// In this example, you can see that `Cell<T>` enables mutation inside an