We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
UnsafeCell
1 parent 5673536 commit 166d8b8Copy full SHA for 166d8b8
library/core/src/cell.rs
@@ -1816,6 +1816,8 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> {
1816
///
1817
/// [`.get_mut()`]: `UnsafeCell::get_mut`
1818
1819
+/// # Memory layout
1820
+///
1821
/// `UnsafeCell<T>` has the same in-memory representation as its inner type `T`. A consequence
1822
/// of this guarantee is that it is possible to convert between `T` and `UnsafeCell<T>`.
1823
/// Special care has to be taken when converting a nested `T` inside of an `Outer<T>` type
0 commit comments