about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/core/src/pin.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/library/core/src/pin.rs b/library/core/src/pin.rs
index 84fed4ed243..dec1b5270d5 100644
--- a/library/core/src/pin.rs
+++ b/library/core/src/pin.rs
@@ -406,6 +406,11 @@ use crate::ops::{CoerceUnsized, Deref, DerefMut, DispatchFromDyn, Receiver};
 #[repr(transparent)]
 #[derive(Copy, Clone)]
 pub struct Pin<P> {
+    // FIXME(#93176): this field is made `#[unstable] #[doc(hidden)] pub` to:
+    //   - deter downstream users from accessing it (which would be unsound!),
+    //   - let the `pin!` macro access it (such a macro requires using struct
+    //     literal syntax in order to benefit from lifetime extension).
+    // Long-term, `unsafe` fields or macro hygiene are expected to offer more robust alternatives.
     #[unstable(feature = "unsafe_pin_internals", issue = "none")]
     #[doc(hidden)]
     pub pointer: P,