@@ -1004,15 +1004,19 @@ impl<T: Copy, A: Allocator> SpecCloneIntoVec<T, A> for [T] {
10041004#[ cfg( not( no_global_oom_handling) ) ]
10051005#[ allow( unused_braces) ]
10061006pub ( crate ) trait SpecCloneIntoVecCo < T , A : Allocator , const CO_ALLOC_PREF : CoAllocPref >
1007- where [ ( ) ; { crate :: meta_num_slots!( A , CO_ALLOC_PREF ) } ] : ,
1008- {
1007+ where
1008+ [ ( ) ; { crate :: meta_num_slots!( A , CO_ALLOC_PREF ) } ] : ,
1009+ {
10091010 fn clone_into_co ( & self , target : & mut Vec < T , A , CO_ALLOC_PREF > ) ;
10101011}
10111012
10121013#[ cfg( not( no_global_oom_handling) ) ]
10131014#[ allow( unused_braces) ]
1014- impl < T : Clone , A : Allocator , const CO_ALLOC_PREF : CoAllocPref > SpecCloneIntoVecCo < T , A , CO_ALLOC_PREF > for [ T ]
1015- where [ ( ) ; { crate :: meta_num_slots!( A , CO_ALLOC_PREF ) } ] : , {
1015+ impl < T : Clone , A : Allocator , const CO_ALLOC_PREF : CoAllocPref >
1016+ SpecCloneIntoVecCo < T , A , CO_ALLOC_PREF > for [ T ]
1017+ where
1018+ [ ( ) ; { crate :: meta_num_slots!( A , CO_ALLOC_PREF ) } ] : ,
1019+ {
10161020 default fn clone_into_co ( & self , target : & mut Vec < T , A , CO_ALLOC_PREF > ) {
10171021 // drop anything in target that will not be overwritten
10181022 target. truncate ( self . len ( ) ) ;
@@ -1029,15 +1033,17 @@ where [(); { crate::meta_num_slots!(A, CO_ALLOC_PREF) }]:, {
10291033
10301034#[ cfg( not( no_global_oom_handling) ) ]
10311035#[ allow( unused_braces) ]
1032- impl < T : Copy , A : Allocator , const CO_ALLOC_PREF : CoAllocPref > SpecCloneIntoVecCo < T , A , CO_ALLOC_PREF > for [ T ]
1033- where [ ( ) ; { crate :: meta_num_slots!( A , CO_ALLOC_PREF ) } ] : , {
1036+ impl < T : Copy , A : Allocator , const CO_ALLOC_PREF : CoAllocPref >
1037+ SpecCloneIntoVecCo < T , A , CO_ALLOC_PREF > for [ T ]
1038+ where
1039+ [ ( ) ; { crate :: meta_num_slots!( A , CO_ALLOC_PREF ) } ] : ,
1040+ {
10341041 fn clone_into_co ( & self , target : & mut Vec < T , A , CO_ALLOC_PREF > ) {
10351042 target. clear ( ) ;
10361043 target. extend_from_slice ( self ) ;
10371044 }
10381045}
10391046
1040-
10411047#[ cfg( not( no_global_oom_handling) ) ]
10421048#[ stable( feature = "rust1" , since = "1.0.0" ) ]
10431049impl < T : Clone > ToOwned for [ T ] {
0 commit comments