Auto merge of #111711 - Jules-Bertholet:document-pin-layout, r=thomcc
Document `Pin` memory layout The fact that `Pin` is `#[repr(transparent)]` technically isn't documented anywhere currently. I don't see any reason why `Pin`'s layout would ever change, so this PR codifies it. `@rustbot` label +T-libs-api -T-libs +A-docs +A-layout +A-pin
This commit is contained in:
commit
48ec50ae39
@ -393,6 +393,8 @@
|
||||
/// value in place, preventing the value referenced by that pointer from being moved
|
||||
/// unless it implements [`Unpin`].
|
||||
///
|
||||
/// `Pin<P>` is guaranteed to have the same memory layout and ABI as `P`.
|
||||
///
|
||||
/// *See the [`pin` module] documentation for an explanation of pinning.*
|
||||
///
|
||||
/// [`pin` module]: self
|
||||
|
Loading…
Reference in New Issue
Block a user