273
273
//! order to identify the type of the pinned pointee data and provide (restricted) access to it.
274
274
//!
275
275
//! A [`Pin<Ptr>`] where [`Ptr: Deref`][Deref] is a "`Ptr`-style pinning pointer" to a pinned
276
- //! [`P ::Target`][Target] – so, a <code>[Pin]<[Box]\<T>></code> is an owned, pinning pointer to a
276
+ //! [`Ptr ::Target`][Target] – so, a <code>[Pin]<[Box]\<T>></code> is an owned, pinning pointer to a
277
277
//! pinned `T`, and a <code>[Pin]<[Rc]\<T>></code> is a reference-counted, pinning pointer to a
278
278
//! pinned `T`.
279
279
//!
590
590
//! # Implementing an address-sensitive type.
591
591
//!
592
592
//! This section goes into detail on important considerations for implementing your own
593
- //! address-sensitive types, which are different from merely using [`Pin<P >`] in a generic
593
+ //! address-sensitive types, which are different from merely using [`Pin<Ptr >`] in a generic
594
594
//! way.
595
595
//!
596
596
//! ## Implementing [`Drop`] for types with address-sensitive states
689
689
//! Even though we can't have the compiler do the assignment for us, it's possible to write
690
690
//! such specialized functions for types that might need it.
691
691
//!
692
- //! Note that it _is_ possible to assign generically through a [`Pin<P >`] by way of [`Pin::set()`].
692
+ //! Note that it _is_ possible to assign generically through a [`Pin<Ptr >`] by way of [`Pin::set()`].
693
693
//! This does not violate any guarantees, since it will run [`drop`] on the pointee value before
694
694
//! assigning the new value. Thus, the [`drop`] implementation still has a chance to perform the
695
695
//! necessary notifications to dependent values before the memory location of the original pinned
@@ -1051,15 +1051,15 @@ use crate::{
1051
1051
#[ fundamental]
1052
1052
#[ repr( transparent) ]
1053
1053
#[ derive( Copy , Clone ) ]
1054
- pub struct Pin < P > {
1054
+ pub struct Pin < Ptr > {
1055
1055
// FIXME(#93176): this field is made `#[unstable] #[doc(hidden)] pub` to:
1056
1056
// - deter downstream users from accessing it (which would be unsound!),
1057
1057
// - let the `pin!` macro access it (such a macro requires using struct
1058
1058
// literal syntax in order to benefit from lifetime extension).
1059
1059
// Long-term, `unsafe` fields or macro hygiene are expected to offer more robust alternatives.
1060
1060
#[ unstable( feature = "unsafe_pin_internals" , issue = "none" ) ]
1061
1061
#[ doc( hidden) ]
1062
- pub pointer : P ,
1062
+ pub pointer : Ptr ,
1063
1063
}
1064
1064
1065
1065
// The following implementations aren't derived in order to avoid soundness
@@ -1069,68 +1069,68 @@ pub struct Pin<P> {
1069
1069
// See <https://internals.rust-lang.org/t/unsoundness-in-pin/11311/73> for more details.
1070
1070
1071
1071
#[ stable( feature = "pin_trait_impls" , since = "1.41.0" ) ]
1072
- impl < P : Deref , Q : Deref > PartialEq < Pin < Q > > for Pin < P >
1072
+ impl < Ptr : Deref , Q : Deref > PartialEq < Pin < Q > > for Pin < Ptr >
1073
1073
where
1074
- P :: Target : PartialEq < Q :: Target > ,
1074
+ Ptr :: Target : PartialEq < Q :: Target > ,
1075
1075
{
1076
1076
fn eq ( & self , other : & Pin < Q > ) -> bool {
1077
- P :: Target :: eq ( self , other)
1077
+ Ptr :: Target :: eq ( self , other)
1078
1078
}
1079
1079
1080
1080
fn ne ( & self , other : & Pin < Q > ) -> bool {
1081
- P :: Target :: ne ( self , other)
1081
+ Ptr :: Target :: ne ( self , other)
1082
1082
}
1083
1083
}
1084
1084
1085
1085
#[ stable( feature = "pin_trait_impls" , since = "1.41.0" ) ]
1086
- impl < P : Deref < Target : Eq > > Eq for Pin < P > { }
1086
+ impl < Ptr : Deref < Target : Eq > > Eq for Pin < Ptr > { }
1087
1087
1088
1088
#[ stable( feature = "pin_trait_impls" , since = "1.41.0" ) ]
1089
- impl < P : Deref , Q : Deref > PartialOrd < Pin < Q > > for Pin < P >
1089
+ impl < Ptr : Deref , Q : Deref > PartialOrd < Pin < Q > > for Pin < Ptr >
1090
1090
where
1091
- P :: Target : PartialOrd < Q :: Target > ,
1091
+ Ptr :: Target : PartialOrd < Q :: Target > ,
1092
1092
{
1093
1093
fn partial_cmp ( & self , other : & Pin < Q > ) -> Option < cmp:: Ordering > {
1094
- P :: Target :: partial_cmp ( self , other)
1094
+ Ptr :: Target :: partial_cmp ( self , other)
1095
1095
}
1096
1096
1097
1097
fn lt ( & self , other : & Pin < Q > ) -> bool {
1098
- P :: Target :: lt ( self , other)
1098
+ Ptr :: Target :: lt ( self , other)
1099
1099
}
1100
1100
1101
1101
fn le ( & self , other : & Pin < Q > ) -> bool {
1102
- P :: Target :: le ( self , other)
1102
+ Ptr :: Target :: le ( self , other)
1103
1103
}
1104
1104
1105
1105
fn gt ( & self , other : & Pin < Q > ) -> bool {
1106
- P :: Target :: gt ( self , other)
1106
+ Ptr :: Target :: gt ( self , other)
1107
1107
}
1108
1108
1109
1109
fn ge ( & self , other : & Pin < Q > ) -> bool {
1110
- P :: Target :: ge ( self , other)
1110
+ Ptr :: Target :: ge ( self , other)
1111
1111
}
1112
1112
}
1113
1113
1114
1114
#[ stable( feature = "pin_trait_impls" , since = "1.41.0" ) ]
1115
- impl < P : Deref < Target : Ord > > Ord for Pin < P > {
1115
+ impl < Ptr : Deref < Target : Ord > > Ord for Pin < Ptr > {
1116
1116
fn cmp ( & self , other : & Self ) -> cmp:: Ordering {
1117
- P :: Target :: cmp ( self , other)
1117
+ Ptr :: Target :: cmp ( self , other)
1118
1118
}
1119
1119
}
1120
1120
1121
1121
#[ stable( feature = "pin_trait_impls" , since = "1.41.0" ) ]
1122
- impl < P : Deref < Target : Hash > > Hash for Pin < P > {
1122
+ impl < Ptr : Deref < Target : Hash > > Hash for Pin < Ptr > {
1123
1123
fn hash < H : Hasher > ( & self , state : & mut H ) {
1124
- P :: Target :: hash ( self , state) ;
1124
+ Ptr :: Target :: hash ( self , state) ;
1125
1125
}
1126
1126
}
1127
1127
1128
- impl < P : Deref < Target : Unpin > > Pin < P > {
1129
- /// Construct a new `Pin<P >` around a pointer to some data of a type that
1128
+ impl < Ptr : Deref < Target : Unpin > > Pin < Ptr > {
1129
+ /// Construct a new `Pin<Ptr >` around a pointer to some data of a type that
1130
1130
/// implements [`Unpin`].
1131
1131
///
1132
1132
/// Unlike `Pin::new_unchecked`, this method is safe because the pointer
1133
- /// `P ` dereferences to an [`Unpin`] type, which cancels the pinning guarantees.
1133
+ /// `Ptr ` dereferences to an [`Unpin`] type, which cancels the pinning guarantees.
1134
1134
///
1135
1135
/// # Examples
1136
1136
///
@@ -1144,16 +1144,16 @@ impl<P: Deref<Target: Unpin>> Pin<P> {
1144
1144
#[ inline( always) ]
1145
1145
#[ rustc_const_unstable( feature = "const_pin" , issue = "76654" ) ]
1146
1146
#[ stable( feature = "pin" , since = "1.33.0" ) ]
1147
- pub const fn new ( pointer : P ) -> Pin < P > {
1147
+ pub const fn new ( pointer : Ptr ) -> Pin < Ptr > {
1148
1148
// SAFETY: the value pointed to is `Unpin`, and so has no requirements
1149
1149
// around pinning.
1150
1150
unsafe { Pin :: new_unchecked ( pointer) }
1151
1151
}
1152
1152
1153
- /// Unwraps this `Pin<P>` returning the underlying pointer.
1153
+ /// Unwraps this `Pin<Ptr>`, returning the underlying pointer.
1154
1154
///
1155
- /// This requires that the data inside this `Pin` implements [`Unpin`] so that we
1156
- /// can ignore the pinning invariants when unwrapping it.
1155
+ /// Doing this operation safely requires that the data pointed at by this pinning pointer
1156
+ /// implemts [`Unpin`] so that we can ignore the pinning invariants when unwrapping it.
1157
1157
///
1158
1158
/// # Examples
1159
1159
///
@@ -1169,13 +1169,13 @@ impl<P: Deref<Target: Unpin>> Pin<P> {
1169
1169
#[ inline( always) ]
1170
1170
#[ rustc_const_unstable( feature = "const_pin" , issue = "76654" ) ]
1171
1171
#[ stable( feature = "pin_into_inner" , since = "1.39.0" ) ]
1172
- pub const fn into_inner ( pin : Pin < P > ) -> P {
1172
+ pub const fn into_inner ( pin : Pin < Ptr > ) -> Ptr {
1173
1173
pin. pointer
1174
1174
}
1175
1175
}
1176
1176
1177
- impl < P : Deref > Pin < P > {
1178
- /// Construct a new `Pin<P >` around a reference to some data of a type that
1177
+ impl < Ptr : Deref > Pin < Ptr > {
1178
+ /// Construct a new `Pin<Ptr >` around a reference to some data of a type that
1179
1179
/// may or may not implement `Unpin`.
1180
1180
///
1181
1181
/// If `pointer` dereferences to an `Unpin` type, `Pin::new` should be used
@@ -1185,18 +1185,18 @@ impl<P: Deref> Pin<P> {
1185
1185
///
1186
1186
/// This constructor is unsafe because we cannot guarantee that the data
1187
1187
/// pointed to by `pointer` is pinned, meaning that the data will not be moved or
1188
- /// its storage invalidated until it gets dropped. If the constructed `Pin<P >` does
1189
- /// not guarantee that the data `P ` points to is pinned, that is a violation of
1188
+ /// its storage invalidated until it gets dropped. If the constructed `Pin<Ptr >` does
1189
+ /// not guarantee that the data `Ptr ` points to is pinned, that is a violation of
1190
1190
/// the API contract and may lead to undefined behavior in later (safe) operations.
1191
1191
///
1192
- /// By using this method, you are making a promise about the `P ::Deref` and
1193
- /// `P ::DerefMut` implementations, if they exist. Most importantly, they
1192
+ /// By using this method, you are making a promise about the `Ptr ::Deref` and
1193
+ /// `Ptr ::DerefMut` implementations, if they exist. Most importantly, they
1194
1194
/// must not move out of their `self` arguments: `Pin::as_mut` and `Pin::as_ref`
1195
- /// will call `DerefMut::deref_mut` and `Deref::deref` *on the pointer type P *
1195
+ /// will call `DerefMut::deref_mut` and `Deref::deref` *on the pointer type `Ptr` *
1196
1196
/// and expect these methods to uphold the pinning invariants.
1197
- /// Moreover, by calling this method you promise that the reference `P `
1197
+ /// Moreover, by calling this method you promise that the reference `Ptr `
1198
1198
/// dereferences to will not be moved out of again; in particular, it
1199
- /// must not be possible to obtain a `&mut P ::Target` and then
1199
+ /// must not be possible to obtain a `&mut Ptr ::Target` and then
1200
1200
/// move out of that reference (using, for example [`mem::swap`]).
1201
1201
///
1202
1202
/// For example, calling `Pin::new_unchecked` on an `&'a mut T` is unsafe because
@@ -1300,7 +1300,7 @@ impl<P: Deref> Pin<P> {
1300
1300
#[ inline( always) ]
1301
1301
#[ rustc_const_unstable( feature = "const_pin" , issue = "76654" ) ]
1302
1302
#[ stable( feature = "pin" , since = "1.33.0" ) ]
1303
- pub const unsafe fn new_unchecked ( pointer : P ) -> Pin < P > {
1303
+ pub const unsafe fn new_unchecked ( pointer : Ptr ) -> Pin < Ptr > {
1304
1304
Pin { pointer }
1305
1305
}
1306
1306
@@ -1313,34 +1313,39 @@ impl<P: Deref> Pin<P> {
1313
1313
/// ruled out by the contract of `Pin::new_unchecked`.
1314
1314
#[ stable( feature = "pin" , since = "1.33.0" ) ]
1315
1315
#[ inline( always) ]
1316
- pub fn as_ref ( & self ) -> Pin < & P :: Target > {
1316
+ pub fn as_ref ( & self ) -> Pin < & Ptr :: Target > {
1317
1317
// SAFETY: see documentation on this function
1318
1318
unsafe { Pin :: new_unchecked ( & * self . pointer ) }
1319
1319
}
1320
1320
1321
- /// Unwraps this `Pin<P >` returning the underlying pointer.
1321
+ /// Unwraps this `Pin<Ptr >` returning the underlying pointer.
1322
1322
///
1323
1323
/// # Safety
1324
1324
///
1325
1325
/// This function is unsafe. You must guarantee that you will continue to
1326
- /// treat the pointer `P ` as pinned after you call this function, so that
1326
+ /// treat the pointer `Ptr ` as pinned after you call this function, so that
1327
1327
/// the invariants on the `Pin` type can be upheld. If the code using the
1328
- /// resulting `P ` does not continue to maintain the pinning invariants that
1328
+ /// resulting `Ptr ` does not continue to maintain the pinning invariants that
1329
1329
/// is a violation of the API contract and may lead to undefined behavior in
1330
1330
/// later (safe) operations.
1331
1331
///
1332
+ /// Note that you must be able to guarantee that the data pointed to by `Ptr`
1333
+ /// will be treated as pinned all the way until its `drop` handler is complete!
1334
+ ///
1335
+ /// *For more information, see the [`pin` module docs][self]*
1336
+ ///
1332
1337
/// If the underlying data is [`Unpin`], [`Pin::into_inner`] should be used
1333
1338
/// instead.
1334
1339
#[ inline( always) ]
1335
1340
#[ rustc_const_unstable( feature = "const_pin" , issue = "76654" ) ]
1336
1341
#[ stable( feature = "pin_into_inner" , since = "1.39.0" ) ]
1337
- pub const unsafe fn into_inner_unchecked ( pin : Pin < P > ) -> P {
1342
+ pub const unsafe fn into_inner_unchecked ( pin : Pin < Ptr > ) -> Ptr {
1338
1343
pin. pointer
1339
1344
}
1340
1345
}
1341
1346
1342
- impl < P : DerefMut > Pin < P > {
1343
- /// Gets a mutable reference to the pinned value this `Pin<P >` points to.
1347
+ impl < Ptr : DerefMut > Pin < Ptr > {
1348
+ /// Gets a mutable reference to the pinned value this `Pin<Ptr >` points to.
1344
1349
///
1345
1350
/// This is a generic method to go from `&mut Pin<Pointer<T>>` to `Pin<&mut T>`.
1346
1351
/// It is safe because, as part of the contract of `Pin::new_unchecked`,
@@ -1371,12 +1376,12 @@ impl<P: DerefMut> Pin<P> {
1371
1376
/// ```
1372
1377
#[ stable( feature = "pin" , since = "1.33.0" ) ]
1373
1378
#[ inline( always) ]
1374
- pub fn as_mut ( & mut self ) -> Pin < & mut P :: Target > {
1379
+ pub fn as_mut ( & mut self ) -> Pin < & mut Ptr :: Target > {
1375
1380
// SAFETY: see documentation on this function
1376
1381
unsafe { Pin :: new_unchecked ( & mut * self . pointer ) }
1377
1382
}
1378
1383
1379
- /// Assigns a new value to the memory location pointed to by the `Pin<P >`.
1384
+ /// Assigns a new value to the memory location pointed to by the `Pin<Ptr >`.
1380
1385
///
1381
1386
/// This overwrites pinned data, but that is okay: the original pinned value's destructor gets
1382
1387
/// run before being overwritten and the new value is also a valid value of the same type, so
@@ -1398,9 +1403,9 @@ impl<P: DerefMut> Pin<P> {
1398
1403
/// [subtle-details]: self#subtle-details-and-the-drop-guarantee
1399
1404
#[ stable( feature = "pin" , since = "1.33.0" ) ]
1400
1405
#[ inline( always) ]
1401
- pub fn set ( & mut self , value : P :: Target )
1406
+ pub fn set ( & mut self , value : Ptr :: Target )
1402
1407
where
1403
- P :: Target : Sized ,
1408
+ Ptr :: Target : Sized ,
1404
1409
{
1405
1410
* ( self . pointer ) = value;
1406
1411
}
@@ -1556,41 +1561,42 @@ impl<T: ?Sized> Pin<&'static T> {
1556
1561
}
1557
1562
}
1558
1563
1559
- impl < ' a , P : DerefMut > Pin < & ' a mut Pin < P > > {
1564
+ impl < ' a , Ptr : DerefMut > Pin < & ' a mut Pin < Ptr > > {
1560
1565
/// Gets `Pin<&mut T>` to the underlying pinned value from this nested `Pin`-pointer.
1561
1566
///
1562
1567
/// This is a generic method to go from `Pin<&mut Pin<Pointer<T>>>` to `Pin<&mut T>`. It is
1563
1568
/// safe because the existence of a `Pin<Pointer<T>>` ensures that the pointee, `T`, cannot
1564
1569
/// move in the future, and this method does not enable the pointee to move. "Malicious"
1565
- /// implementations of `P ::DerefMut` are likewise ruled out by the contract of
1570
+ /// implementations of `Ptr ::DerefMut` are likewise ruled out by the contract of
1566
1571
/// `Pin::new_unchecked`.
1567
1572
#[ unstable( feature = "pin_deref_mut" , issue = "86918" ) ]
1568
1573
#[ must_use = "`self` will be dropped if the result is not used" ]
1569
1574
#[ inline( always) ]
1570
- pub fn as_deref_mut ( self ) -> Pin < & ' a mut P :: Target > {
1575
+ pub fn as_deref_mut ( self ) -> Pin < & ' a mut Ptr :: Target > {
1571
1576
// SAFETY: What we're asserting here is that going from
1572
1577
//
1573
- // Pin<&mut Pin<P >>
1578
+ // Pin<&mut Pin<Ptr >>
1574
1579
//
1575
1580
// to
1576
1581
//
1577
- // Pin<&mut P ::Target>
1582
+ // Pin<&mut Ptr ::Target>
1578
1583
//
1579
1584
// is safe.
1580
1585
//
1581
1586
// We need to ensure that two things hold for that to be the case:
1582
1587
//
1583
- // 1) Once we give out a `Pin<&mut P::Target>`, an `&mut P::Target` will not be given out.
1584
- // 2) By giving out a `Pin<&mut P::Target>`, we do not risk of violating `Pin<&mut Pin<P>>`
1588
+ // 1) Once we give out a `Pin<&mut Ptr::Target>`, an `&mut Ptr::Target` will not be given out.
1589
+ // 2) By giving out a `Pin<&mut Ptr::Target>`, we do not risk of violating
1590
+ // `Pin<&mut Pin<Ptr>>`
1585
1591
//
1586
- // The existence of `Pin<P >` is sufficient to guarantee #1: since we already have a
1587
- // `Pin<P >`, it must already uphold the pinning guarantees, which must mean that
1588
- // `Pin<&mut P ::Target>` does as well, since `Pin::as_mut` is safe. We do not have to rely
1589
- // on the fact that P is _also_ pinned.
1592
+ // The existence of `Pin<Ptr >` is sufficient to guarantee #1: since we already have a
1593
+ // `Pin<Ptr >`, it must already uphold the pinning guarantees, which must mean that
1594
+ // `Pin<&mut Ptr ::Target>` does as well, since `Pin::as_mut` is safe. We do not have to rely
1595
+ // on the fact that `Ptr` is _also_ pinned.
1590
1596
//
1591
- // For #2, we need to ensure that code given a `Pin<&mut P ::Target>` cannot cause the
1592
- // `Pin<P >` to move? That is not possible, since `Pin<&mut P ::Target>` no longer retains
1593
- // any access to the `P ` itself, much less the `Pin<P >`.
1597
+ // For #2, we need to ensure that code given a `Pin<&mut Ptr ::Target>` cannot cause the
1598
+ // `Pin<Ptr >` to move? That is not possible, since `Pin<&mut Ptr ::Target>` no longer retains
1599
+ // any access to the `Ptr ` itself, much less the `Pin<Ptr >`.
1594
1600
unsafe { self . get_unchecked_mut ( ) } . as_mut ( )
1595
1601
}
1596
1602
}
@@ -1610,39 +1616,39 @@ impl<T: ?Sized> Pin<&'static mut T> {
1610
1616
}
1611
1617
1612
1618
#[ stable( feature = "pin" , since = "1.33.0" ) ]
1613
- impl < P : Deref > Deref for Pin < P > {
1614
- type Target = P :: Target ;
1615
- fn deref ( & self ) -> & P :: Target {
1619
+ impl < Ptr : Deref > Deref for Pin < Ptr > {
1620
+ type Target = Ptr :: Target ;
1621
+ fn deref ( & self ) -> & Ptr :: Target {
1616
1622
Pin :: get_ref ( Pin :: as_ref ( self ) )
1617
1623
}
1618
1624
}
1619
1625
1620
1626
#[ stable( feature = "pin" , since = "1.33.0" ) ]
1621
- impl < P : DerefMut < Target : Unpin > > DerefMut for Pin < P > {
1622
- fn deref_mut ( & mut self ) -> & mut P :: Target {
1627
+ impl < Ptr : DerefMut < Target : Unpin > > DerefMut for Pin < Ptr > {
1628
+ fn deref_mut ( & mut self ) -> & mut Ptr :: Target {
1623
1629
Pin :: get_mut ( Pin :: as_mut ( self ) )
1624
1630
}
1625
1631
}
1626
1632
1627
1633
#[ unstable( feature = "receiver_trait" , issue = "none" ) ]
1628
- impl < P : Receiver > Receiver for Pin < P > { }
1634
+ impl < Ptr : Receiver > Receiver for Pin < Ptr > { }
1629
1635
1630
1636
#[ stable( feature = "pin" , since = "1.33.0" ) ]
1631
- impl < P : fmt:: Debug > fmt:: Debug for Pin < P > {
1637
+ impl < Ptr : fmt:: Debug > fmt:: Debug for Pin < Ptr > {
1632
1638
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
1633
1639
fmt:: Debug :: fmt ( & self . pointer , f)
1634
1640
}
1635
1641
}
1636
1642
1637
1643
#[ stable( feature = "pin" , since = "1.33.0" ) ]
1638
- impl < P : fmt:: Display > fmt:: Display for Pin < P > {
1644
+ impl < Ptr : fmt:: Display > fmt:: Display for Pin < Ptr > {
1639
1645
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
1640
1646
fmt:: Display :: fmt ( & self . pointer , f)
1641
1647
}
1642
1648
}
1643
1649
1644
1650
#[ stable( feature = "pin" , since = "1.33.0" ) ]
1645
- impl < P : fmt:: Pointer > fmt:: Pointer for Pin < P > {
1651
+ impl < Ptr : fmt:: Pointer > fmt:: Pointer for Pin < Ptr > {
1646
1652
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
1647
1653
fmt:: Pointer :: fmt ( & self . pointer , f)
1648
1654
}
@@ -1654,10 +1660,10 @@ impl<P: fmt::Pointer> fmt::Pointer for Pin<P> {
1654
1660
// for other reasons, though, so we just need to take care not to allow such
1655
1661
// impls to land in std.
1656
1662
#[ stable( feature = "pin" , since = "1.33.0" ) ]
1657
- impl < P , U > CoerceUnsized < Pin < U > > for Pin < P > where P : CoerceUnsized < U > { }
1663
+ impl < Ptr , U > CoerceUnsized < Pin < U > > for Pin < Ptr > where Ptr : CoerceUnsized < U > { }
1658
1664
1659
1665
#[ stable( feature = "pin" , since = "1.33.0" ) ]
1660
- impl < P , U > DispatchFromDyn < Pin < U > > for Pin < P > where P : DispatchFromDyn < U > { }
1666
+ impl < Ptr , U > DispatchFromDyn < Pin < U > > for Pin < Ptr > where Ptr : DispatchFromDyn < U > { }
1661
1667
1662
1668
/// Constructs a <code>[Pin]<[&mut] T></code>, by pinning a `value: T` locally.
1663
1669
///
0 commit comments