add "Memory layout" subsection to documentation of UnsafeCell for additional clarity
This commit is contained in:
parent
5673536153
commit
166d8b8c2b
1 changed files with 2 additions and 0 deletions
|
|
@ -1816,6 +1816,8 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> {
|
|||
///
|
||||
/// [`.get_mut()`]: `UnsafeCell::get_mut`
|
||||
///
|
||||
/// # Memory layout
|
||||
///
|
||||
/// `UnsafeCell<T>` has the same in-memory representation as its inner type `T`. A consequence
|
||||
/// of this guarantee is that it is possible to convert between `T` and `UnsafeCell<T>`.
|
||||
/// Special care has to be taken when converting a nested `T` inside of an `Outer<T>` type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue