@@ -264,6 +264,7 @@ use core::ops::{CoerceUnsized, Deref, DerefMut, DerefPure, DispatchFromDyn, Rece
264
264
use core:: panic:: { RefUnwindSafe , UnwindSafe } ;
265
265
#[ cfg( not( no_global_oom_handling) ) ]
266
266
use core:: pin:: Pin ;
267
+ use core:: pin:: PinCoerceUnsized ;
267
268
use core:: ptr:: { self , drop_in_place, NonNull } ;
268
269
#[ cfg( not( no_global_oom_handling) ) ]
269
270
use core:: slice:: from_raw_parts_mut;
@@ -2181,6 +2182,9 @@ impl<T: ?Sized, A: Allocator> Deref for Rc<T, A> {
2181
2182
}
2182
2183
}
2183
2184
2185
+ #[ unstable( feature = "pin_coerce_unsized_trait" , issue = "123430" ) ]
2186
+ unsafe impl < T : ?Sized , A : Allocator > PinCoerceUnsized for Rc < T , A > { }
2187
+
2184
2188
#[ unstable( feature = "deref_pure_trait" , issue = "87121" ) ]
2185
2189
unsafe impl < T : ?Sized , A : Allocator > DerefPure for Rc < T , A > { }
2186
2190
@@ -3696,6 +3700,9 @@ impl<T: ?Sized, A: Allocator> Deref for UniqueRc<T, A> {
3696
3700
}
3697
3701
}
3698
3702
3703
+ #[ unstable( feature = "pin_coerce_unsized_trait" , issue = "123430" ) ]
3704
+ unsafe impl < T : ?Sized > PinCoerceUnsized for UniqueRc < T > { }
3705
+
3699
3706
#[ unstable( feature = "unique_rc_arc" , issue = "112566" ) ]
3700
3707
impl < T : ?Sized , A : Allocator > DerefMut for UniqueRc < T , A > {
3701
3708
fn deref_mut ( & mut self ) -> & mut T {
0 commit comments