@@ -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;
@@ -2176,6 +2177,12 @@ impl<T: ?Sized, A: Allocator> Deref for Rc<T, A> {
21762177 }
21772178}
21782179
2180+ #[ unstable( feature = "pin_coerce_unsized_trait" , issue = "123430" ) ]
2181+ unsafe impl < T : ?Sized , A : Allocator > PinCoerceUnsized for Rc < T , A > { }
2182+
2183+ #[ unstable( feature = "pin_coerce_unsized_trait" , issue = "123430" ) ]
2184+ unsafe impl < T : ?Sized , A : Allocator > PinCoerceUnsized for Weak < T , A > { }
2185+
21792186#[ unstable( feature = "deref_pure_trait" , issue = "87121" ) ]
21802187unsafe impl < T : ?Sized , A : Allocator > DerefPure for Rc < T , A > { }
21812188
@@ -3689,6 +3696,9 @@ impl<T: ?Sized, A: Allocator> Deref for UniqueRc<T, A> {
36893696 }
36903697}
36913698
3699+ #[ unstable( feature = "pin_coerce_unsized_trait" , issue = "123430" ) ]
3700+ unsafe impl < T : ?Sized > PinCoerceUnsized for UniqueRc < T > { }
3701+
36923702#[ unstable( feature = "unique_rc_arc" , issue = "112566" ) ]
36933703impl < T : ?Sized , A : Allocator > DerefMut for UniqueRc < T , A > {
36943704 fn deref_mut ( & mut self ) -> & mut T {
0 commit comments