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 {
17081708}
17091709
17101710#[ stable( feature = "pin" , since = "1.33.0" ) ]
1711+ #[ cfg( not( doc) ) ]
17111712impl < Ptr > DerefMut for Pin < Ptr >
17121713where
17131714 Ptr : Deref ,
@@ -1720,6 +1721,20 @@ where
17201721 }
17211722}
17221723
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+
17231738#[ unstable( feature = "deref_pure_trait" , issue = "87121" ) ]
17241739unsafe impl < Ptr : DerefPure > DerefPure for Pin < Ptr > { }
17251740
You can’t perform that action at this time.
0 commit comments