@@ -260,7 +260,9 @@ use core::marker::{PhantomData, Unsize};
260
260
#[ cfg( not( no_global_oom_handling) ) ]
261
261
use core:: mem:: size_of_val;
262
262
use core:: mem:: { self , align_of_val_raw, forget, ManuallyDrop } ;
263
- use core:: ops:: { CoerceUnsized , Deref , DerefMut , DerefPure , DispatchFromDyn , Receiver } ;
263
+ use core:: ops:: {
264
+ CoerceUnsized , Deref , DerefMut , DerefPure , DispatchFromDyn , Receiver , StableDeref ,
265
+ } ;
264
266
use core:: panic:: { RefUnwindSafe , UnwindSafe } ;
265
267
#[ cfg( not( no_global_oom_handling) ) ]
266
268
use core:: pin:: Pin ;
@@ -2127,6 +2129,9 @@ impl<T: ?Sized, A: Allocator> Deref for Rc<T, A> {
2127
2129
}
2128
2130
}
2129
2131
2132
+ #[ unstable( feature = "stable_deref_trait" , issue = "123430" ) ]
2133
+ unsafe impl < T : ?Sized , A : Allocator > StableDeref for Rc < T , A > { }
2134
+
2130
2135
#[ unstable( feature = "deref_pure_trait" , issue = "87121" ) ]
2131
2136
unsafe impl < T : ?Sized , A : Allocator > DerefPure for Rc < T , A > { }
2132
2137
@@ -3572,6 +3577,9 @@ impl<T> Deref for UniqueRc<T> {
3572
3577
}
3573
3578
}
3574
3579
3580
+ #[ unstable( feature = "stable_deref_trait" , issue = "123430" ) ]
3581
+ unsafe impl < T > StableDeref for UniqueRc < T > { }
3582
+
3575
3583
#[ unstable( feature = "unique_rc_arc" , issue = "112566" ) ]
3576
3584
impl < T > DerefMut for UniqueRc < T > {
3577
3585
fn deref_mut ( & mut self ) -> & mut T {
0 commit comments