@@ -260,7 +260,9 @@ use core::marker::{PhantomData, Unsize};
260260#[ cfg( not( no_global_oom_handling) ) ]
261261use core:: mem:: size_of_val;
262262use 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+ } ;
264266use core:: panic:: { RefUnwindSafe , UnwindSafe } ;
265267#[ cfg( not( no_global_oom_handling) ) ]
266268use core:: pin:: Pin ;
@@ -2127,6 +2129,9 @@ impl<T: ?Sized, A: Allocator> Deref for Rc<T, A> {
21272129 }
21282130}
21292131
2132+ #[ unstable( feature = "stable_deref_trait" , issue = "123430" ) ]
2133+ unsafe impl < T : ?Sized , A : Allocator > StableDeref for Rc < T , A > { }
2134+
21302135#[ unstable( feature = "deref_pure_trait" , issue = "87121" ) ]
21312136unsafe impl < T : ?Sized , A : Allocator > DerefPure for Rc < T , A > { }
21322137
@@ -3572,6 +3577,9 @@ impl<T> Deref for UniqueRc<T> {
35723577 }
35733578}
35743579
3580+ #[ unstable( feature = "stable_deref_trait" , issue = "123430" ) ]
3581+ unsafe impl < T > StableDeref for UniqueRc < T > { }
3582+
35753583#[ unstable( feature = "unique_rc_arc" , issue = "112566" ) ]
35763584impl < T > DerefMut for UniqueRc < T > {
35773585 fn deref_mut ( & mut self ) -> & mut T {
0 commit comments