@@ -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;
@@ -2176,6 +2177,12 @@ impl<T: ?Sized, A: Allocator> Deref for Rc<T, A> {
2176
2177
}
2177
2178
}
2178
2179
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
+
2179
2186
#[ unstable( feature = "deref_pure_trait" , issue = "87121" ) ]
2180
2187
unsafe impl < T : ?Sized , A : Allocator > DerefPure for Rc < T , A > { }
2181
2188
@@ -3689,6 +3696,9 @@ impl<T: ?Sized, A: Allocator> Deref for UniqueRc<T, A> {
3689
3696
}
3690
3697
}
3691
3698
3699
+ #[ unstable( feature = "pin_coerce_unsized_trait" , issue = "123430" ) ]
3700
+ unsafe impl < T : ?Sized > PinCoerceUnsized for UniqueRc < T > { }
3701
+
3692
3702
#[ unstable( feature = "unique_rc_arc" , issue = "112566" ) ]
3693
3703
impl < T : ?Sized , A : Allocator > DerefMut for UniqueRc < T , A > {
3694
3704
fn deref_mut ( & mut self ) -> & mut T {
0 commit comments