mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
add "Memory layout" subsection to documentation of UnsafeCell
for additional clarity
This commit is contained in:
parent
5673536153
commit
166d8b8c2b
@ -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…
Reference in New Issue
Block a user