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