From f259a8ab04524606d246a1a216d4c24cd19c09a7 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 15 Jan 2023 22:39:43 +0100 Subject: [PATCH] guarantee the memory layout of `Cell` --- library/core/src/cell.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs index 129213fde7491..d571f1d51add5 100644 --- a/library/core/src/cell.rs +++ b/library/core/src/cell.rs @@ -209,6 +209,10 @@ pub use once::OnceCell; /// A mutable memory location. /// +/// # Memory layout +/// +/// `Cell` shares the same memory layout and caveats as `UnsafeCell`. +/// /// # Examples /// /// In this example, you can see that `Cell` enables mutation inside an