File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -899,13 +899,15 @@ marker_impls! {
899
899
{ T : ?Sized } & mut T ,
900
900
}
901
901
902
- /// Types that do not need to follow the rules of pinning.
902
+ /// Types that do not require any pinning guarantees .
903
903
///
904
904
/// For information on what "pinning" is, see the [`pin` module] documentation.
905
905
///
906
- /// Implementing the `Unpin` trait for `T` lifts the restrictions of pinning off that type.
907
- /// This means that, if `T: Unpin`, it cannot be assumed that a value of type `T` will be bound
908
- /// by the invariants that pinning infers, *even* when "pinned" by a [`Pin<Ptr>`] pointing at it.
906
+ /// Implementing the `Unpin` trait for `T` expresses the fact that `T` is pinning-agnostic:
907
+ /// it shall not expose nor rely on any pinning guarantees. This, in turn, means that a
908
+ /// `Pin`-wrapped pointer to such a type can feature a *fully unrestricted* API.
909
+ /// In other words, if `T: Unpin`, a value of type `T` will *not* be bound by the invariants
910
+ /// which pinning otherwise offers, even when "pinned" by a [`Pin<Ptr>`] pointing at it.
909
911
/// When a value of type `T` is pointed at by a [`Pin<Ptr>`], [`Pin`] will not restrict access
910
912
/// to the pointee value like it normally would, thus allowing the user to do anything that they
911
913
/// normally could with a non-[`Pin`]-wrapped `Ptr` to that value.
You can’t perform that action at this time.
0 commit comments