Skip to content

Commit f259a8a

Browse files
committed
guarantee the memory layout of Cell
1 parent ae4d89d commit f259a8a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/core/src/cell.rs

+4
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ pub use once::OnceCell;
209209

210210
/// A mutable memory location.
211211
///
212+
/// # Memory layout
213+
///
214+
/// `Cell<T>` shares the same memory layout and caveats as `UnsafeCell<T>`.
215+
///
212216
/// # Examples
213217
///
214218
/// In this example, you can see that `Cell<T>` enables mutation inside an

0 commit comments

Comments
 (0)