about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJules Bertholet <julesbertholet@quoi.xyz>2023-05-18 01:30:12 -0400
committerJules Bertholet <julesbertholet@quoi.xyz>2023-05-18 01:30:12 -0400
commitf16acbeef63cee81026013f6f8ffd538a6e04e66 (patch)
treef721d066ee52a04568a44a598d7380a619880226
parent77fb0cd3aa276919e00397f526616c5036562ea1 (diff)
downloadrust-f16acbeef63cee81026013f6f8ffd538a6e04e66.tar.gz
rust-f16acbeef63cee81026013f6f8ffd538a6e04e66.zip
Document `Pin` memory layout
-rw-r--r--library/core/src/pin.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/pin.rs b/library/core/src/pin.rs
index c4b89a63019..6b319b4355c 100644
--- a/library/core/src/pin.rs
+++ b/library/core/src/pin.rs
@@ -393,6 +393,8 @@ use crate::ops::{CoerceUnsized, Deref, DerefMut, DispatchFromDyn, Receiver};
 /// 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