@@ -407,14 +407,7 @@ use crate::ops::{CoerceUnsized, Deref, DerefMut, DispatchFromDyn, Receiver};
407407#[ repr( transparent) ]
408408#[ derive( Copy , Clone ) ]
409409pub struct Pin < P > {
410- // FIXME(#93176): this field is made `#[unstable] #[doc(hidden)] pub` to:
411- // - deter downstream users from accessing it (which would be unsound!),
412- // - let the `pin!` macro access it (such a macro requires using struct
413- // literal syntax in order to benefit from lifetime extension).
414- // Long-term, `unsafe` fields or macro hygiene are expected to offer more robust alternatives.
415- #[ unstable( feature = "unsafe_pin_internals" , issue = "none" ) ]
416- #[ doc( hidden) ]
417- pub pointer : P ,
410+ pointer : P ,
418411}
419412
420413// The following implementations aren't derived in order to avoid soundness
@@ -1173,8 +1166,6 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
11731166///
11741167/// [`Box::pin`]: ../../std/boxed/struct.Box.html#method.pin
11751168#[ stable( feature = "pin_macro" , since = "1.68.0" ) ]
1176- #[ rustc_macro_transparency = "semitransparent" ]
1177- #[ allow_internal_unstable( unsafe_pin_internals) ]
11781169pub macro pin ( $value: expr $( , ) ?) {
11791170 // This is `Pin::new_unchecked(&mut { $value })`, so, for starters, let's
11801171 // review such a hypothetical macro (that any user-code could define):
@@ -1246,5 +1237,5 @@ pub macro pin($value:expr $(,)?) {
12461237 //
12471238 // See https://doc.rust-lang.org/1.58.1/reference/destructors.html#temporary-lifetime-extension
12481239 // for more info.
1249- $crate :: pin :: Pin :: < & mut _ > { pointer : & mut { $value } }
1240+ Pin { pointer : & mut { $value } }
12501241}
0 commit comments