@@ -256,6 +256,7 @@ use core::ops::{CoerceUnsized, Deref, DerefMut, DerefPure, DispatchFromDyn, Rece
256256use core:: panic:: { RefUnwindSafe , UnwindSafe } ;
257257#[ cfg( not( no_global_oom_handling) ) ]
258258use core:: pin:: Pin ;
259+ use core:: pin:: PinCoerceUnsized ;
259260use core:: ptr:: { self , drop_in_place, NonNull } ;
260261#[ cfg( not( no_global_oom_handling) ) ]
261262use core:: slice:: from_raw_parts_mut;
@@ -2177,6 +2178,12 @@ impl<T: ?Sized, A: Allocator> Deref for Rc<T, A> {
21772178 }
21782179}
21792180
2181+ #[ unstable( feature = "pin_coerce_unsized_trait" , issue = "123430" ) ]
2182+ unsafe impl < T : ?Sized , A : Allocator > PinCoerceUnsized for Rc < T , A > { }
2183+
2184+ #[ unstable( feature = "pin_coerce_unsized_trait" , issue = "123430" ) ]
2185+ unsafe impl < T : ?Sized , A : Allocator > PinCoerceUnsized for Weak < T , A > { }
2186+
21802187#[ unstable( feature = "deref_pure_trait" , issue = "87121" ) ]
21812188unsafe impl < T : ?Sized , A : Allocator > DerefPure for Rc < T , A > { }
21822189
@@ -3691,6 +3698,9 @@ impl<T: ?Sized, A: Allocator> Deref for UniqueRc<T, A> {
36913698 }
36923699}
36933700
3701+ #[ unstable( feature = "pin_coerce_unsized_trait" , issue = "123430" ) ]
3702+ unsafe impl < T : ?Sized > PinCoerceUnsized for UniqueRc < T > { }
3703+
36943704#[ unstable( feature = "unique_rc_arc" , issue = "112566" ) ]
36953705impl < T : ?Sized , A : Allocator > DerefMut for UniqueRc < T , A > {
36963706 fn deref_mut ( & mut self ) -> & mut T {
0 commit comments