File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1708,6 +1708,7 @@ mod hidden {
1708
1708
}
1709
1709
1710
1710
#[ stable( feature = "pin" , since = "1.33.0" ) ]
1711
+ #[ cfg( not( doc) ) ]
1711
1712
impl < Ptr > DerefMut for Pin < Ptr >
1712
1713
where
1713
1714
Ptr : Deref ,
@@ -1720,6 +1721,20 @@ where
1720
1721
}
1721
1722
}
1722
1723
1724
+ // This impl is only used during documentation, but it is fully equivalent to the above impl with
1725
+ // the exception of how the orphan rule treats it.
1726
+ #[ stable( feature = "pin" , since = "1.33.0" ) ]
1727
+ #[ cfg( doc) ]
1728
+ impl < Ptr > DerefMut for Pin < Ptr >
1729
+ where
1730
+ Ptr : DerefMut ,
1731
+ Ptr :: Target : Unpin ,
1732
+ {
1733
+ fn deref_mut ( & mut self ) -> & mut Ptr :: Target {
1734
+ Pin :: get_mut ( Pin :: as_mut ( self ) )
1735
+ }
1736
+ }
1737
+
1723
1738
#[ unstable( feature = "deref_pure_trait" , issue = "87121" ) ]
1724
1739
unsafe impl < Ptr : DerefPure > DerefPure for Pin < Ptr > { }
1725
1740
You can’t perform that action at this time.
0 commit comments