@@ -256,6 +256,7 @@ use core::ops::{CoerceUnsized, Deref, DerefMut, DerefPure, DispatchFromDyn, Rece
256
256
use core:: panic:: { RefUnwindSafe , UnwindSafe } ;
257
257
#[ cfg( not( no_global_oom_handling) ) ]
258
258
use core:: pin:: Pin ;
259
+ use core:: pin:: PinCoerceUnsized ;
259
260
use core:: ptr:: { self , drop_in_place, NonNull } ;
260
261
#[ cfg( not( no_global_oom_handling) ) ]
261
262
use core:: slice:: from_raw_parts_mut;
@@ -2177,6 +2178,12 @@ impl<T: ?Sized, A: Allocator> Deref for Rc<T, A> {
2177
2178
}
2178
2179
}
2179
2180
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
+
2180
2187
#[ unstable( feature = "deref_pure_trait" , issue = "87121" ) ]
2181
2188
unsafe impl < T : ?Sized , A : Allocator > DerefPure for Rc < T , A > { }
2182
2189
@@ -3691,6 +3698,9 @@ impl<T: ?Sized, A: Allocator> Deref for UniqueRc<T, A> {
3691
3698
}
3692
3699
}
3693
3700
3701
+ #[ unstable( feature = "pin_coerce_unsized_trait" , issue = "123430" ) ]
3702
+ unsafe impl < T : ?Sized > PinCoerceUnsized for UniqueRc < T > { }
3703
+
3694
3704
#[ unstable( feature = "unique_rc_arc" , issue = "112566" ) ]
3695
3705
impl < T : ?Sized , A : Allocator > DerefMut for UniqueRc < T , A > {
3696
3706
fn deref_mut ( & mut self ) -> & mut T {
0 commit comments