@@ -407,14 +407,7 @@ use crate::ops::{CoerceUnsized, Deref, DerefMut, DispatchFromDyn, Receiver};
407
407
#[ repr( transparent) ]
408
408
#[ derive( Copy , Clone ) ]
409
409
pub 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 ,
418
411
}
419
412
420
413
// 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> {}
1173
1166
///
1174
1167
/// [`Box::pin`]: ../../std/boxed/struct.Box.html#method.pin
1175
1168
#[ stable( feature = "pin_macro" , since = "1.68.0" ) ]
1176
- #[ rustc_macro_transparency = "semitransparent" ]
1177
- #[ allow_internal_unstable( unsafe_pin_internals) ]
1178
1169
pub macro pin ( $value: expr $( , ) ?) {
1179
1170
// This is `Pin::new_unchecked(&mut { $value })`, so, for starters, let's
1180
1171
// review such a hypothetical macro (that any user-code could define):
@@ -1246,5 +1237,5 @@ pub macro pin($value:expr $(,)?) {
1246
1237
//
1247
1238
// See https://doc.rust-lang.org/1.58.1/reference/destructors.html#temporary-lifetime-extension
1248
1239
// for more info.
1249
- $crate :: pin :: Pin :: < & mut _ > { pointer : & mut { $value } }
1240
+ Pin { pointer : & mut { $value } }
1250
1241
}
0 commit comments