@@ -1004,15 +1004,19 @@ impl<T: Copy, A: Allocator> SpecCloneIntoVec<T, A> for [T] {
1004
1004
#[ cfg( not( no_global_oom_handling) ) ]
1005
1005
#[ allow( unused_braces) ]
1006
1006
pub ( 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
+ {
1009
1010
fn clone_into_co ( & self , target : & mut Vec < T , A , CO_ALLOC_PREF > ) ;
1010
1011
}
1011
1012
1012
1013
#[ cfg( not( no_global_oom_handling) ) ]
1013
1014
#[ 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
+ {
1016
1020
default fn clone_into_co ( & self , target : & mut Vec < T , A , CO_ALLOC_PREF > ) {
1017
1021
// drop anything in target that will not be overwritten
1018
1022
target. truncate ( self . len ( ) ) ;
@@ -1029,15 +1033,17 @@ where [(); { crate::meta_num_slots!(A, CO_ALLOC_PREF) }]:, {
1029
1033
1030
1034
#[ cfg( not( no_global_oom_handling) ) ]
1031
1035
#[ 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
+ {
1034
1041
fn clone_into_co ( & self , target : & mut Vec < T , A , CO_ALLOC_PREF > ) {
1035
1042
target. clear ( ) ;
1036
1043
target. extend_from_slice ( self ) ;
1037
1044
}
1038
1045
}
1039
1046
1040
-
1041
1047
#[ cfg( not( no_global_oom_handling) ) ]
1042
1048
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1043
1049
impl < T : Clone > ToOwned for [ T ] {
0 commit comments