From f16acbeef63cee81026013f6f8ffd538a6e04e66 Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Thu, 18 May 2023 01:30:12 -0400 Subject: [PATCH] Document `Pin` memory layout --- library/core/src/pin.rs | 2 ++ 1 file changed, 2 insertions(+) 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 @@ /// value in place, preventing the value referenced by that pointer from being moved /// unless it implements [`Unpin`]. /// +/// `Pin

` 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