Skip to content

Commit 302e33f

Browse files
committed
add description of the memory layout for UnsafeCell<T>
1 parent 56e7678 commit 302e33f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/core/src/cell.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1811,6 +1811,8 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> {
18111811
///
18121812
/// [`.get_mut()`]: `UnsafeCell::get_mut`
18131813
///
1814+
/// `UnsafeCell<T>` has the same in-memory representation as its inner type `T`.
1815+
///
18141816
/// # Examples
18151817
///
18161818
/// Here is an example showcasing how to soundly mutate the contents of an `UnsafeCell<_>` despite

0 commit comments

Comments
 (0)