@@ -249,6 +249,8 @@ use std::boxed::Box;
249249use core:: any:: Any ;
250250use core:: borrow;
251251use core:: cell:: Cell ;
252+ #[ cfg( not( no_global_oom_handling) ) ]
253+ use core:: clone:: CloneToUninit ;
252254use core:: cmp:: Ordering ;
253255use core:: fmt;
254256use core:: hash:: { Hash , Hasher } ;
@@ -268,8 +270,6 @@ use core::slice::from_raw_parts_mut;
268270
269271#[ cfg( not( no_global_oom_handling) ) ]
270272use crate :: alloc:: handle_alloc_error;
271- #[ cfg( not( no_global_oom_handling) ) ]
272- use crate :: alloc:: WriteCloneIntoRaw ;
273273use crate :: alloc:: { AllocError , Allocator , Global , Layout } ;
274274use crate :: borrow:: { Cow , ToOwned } ;
275275#[ cfg( not( no_global_oom_handling) ) ]
@@ -1810,7 +1810,7 @@ impl<T: Clone, A: Allocator + Clone> Rc<T, A> {
18101810let mut rc =Self :: new_uninit_in ( this. alloc . clone ( ) ) ;
18111811unsafe {
18121812let data =Rc :: get_mut_unchecked ( & mut rc) ;
1813- ( * * this) . write_clone_into_raw ( data. as_mut_ptr ( ) ) ;
1813+ ( * * this) . clone_to_uninit ( data. as_mut_ptr ( ) ) ;
18141814* this = rc. assume_init ( ) ;
18151815}
18161816} else if Rc :: weak_count ( this) !=0 {