@@ -461,10 +461,13 @@ impl<T> [T] {
461461 #[ rustc_allow_incoherent_impl]
462462 #[ inline]
463463 #[ unstable( feature = "allocator_api" , issue = "32838" ) ]
464- pub fn to_vec_in < A : Allocator > ( & self , alloc : A ) -> Vec < T , A >
464+ pub fn to_vec_in < A : Allocator , const COOP_PREFERRED : bool > (
465+ & self ,
466+ alloc : A ,
467+ ) -> Vec < T , A , COOP_PREFERRED >
465468 where
466469 T : Clone ,
467- [ ( ) ; core:: alloc:: co_alloc_metadata_num_slots :: < A > ( ) ] : ,
470+ [ ( ) ; core:: alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
468471 {
469472 // N.B., see the `hack` module in this file for more details.
470473 hack:: to_vec ( self , alloc)
@@ -487,9 +490,11 @@ impl<T> [T] {
487490 #[ rustc_allow_incoherent_impl]
488491 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
489492 #[ inline]
490- pub fn into_vec < A : Allocator > ( self : Box < Self , A > ) -> Vec < T , A >
493+ pub fn into_vec < A : Allocator , const COOP_PREFERRED : bool > (
494+ self : Box < Self , A > ,
495+ ) -> Vec < T , A , COOP_PREFERRED >
491496 where
492- [ ( ) ; core:: alloc:: co_alloc_metadata_num_slots :: < A > ( ) ] : ,
497+ [ ( ) ; core:: alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
493498 {
494499 // N.B., see the `hack` module in this file for more details.
495500 hack:: into_vec ( self )
@@ -734,6 +739,7 @@ pub trait Join<Separator> {
734739 fn join ( slice : & Self , sep : Separator ) -> Self :: Output ;
735740}
736741
742+ // COOP_NOT_POSSIBLE
737743#[ cfg( not( no_global_oom_handling) ) ]
738744#[ unstable( feature = "slice_concat_ext" , issue = "27747" ) ]
739745impl < T : Clone , V : Borrow < [ T ] > > Concat < T > for [ V ] {
@@ -749,6 +755,7 @@ impl<T: Clone, V: Borrow<[T]>> Concat<T> for [V] {
749755 }
750756}
751757
758+ // COOP_NOT_POSSIBLE
752759#[ cfg( not( no_global_oom_handling) ) ]
753760#[ unstable( feature = "slice_concat_ext" , issue = "27747" ) ]
754761impl < T : Clone , V : Borrow < [ T ] > > Join < & T > for [ V ] {
@@ -772,10 +779,11 @@ impl<T: Clone, V: Borrow<[T]>> Join<&T> for [V] {
772779 }
773780}
774781
782+ // COOP_NOT_POSSIBLE
775783#[ cfg( not( no_global_oom_handling) ) ]
776784#[ unstable( feature = "slice_concat_ext" , issue = "27747" ) ]
777785impl < T : Clone , V : Borrow < [ T ] > > Join < & [ T ] > for [ V ] {
778- type Output = Vec < T > ;
786+ type Output = Vec < T , Global > ;
779787
780788 fn join ( slice : & Self , sep : & [ T ] ) -> Vec < T > {
781789 let mut iter = slice. iter ( ) ;
@@ -820,6 +828,7 @@ where
820828 }
821829}
822830
831+ // COOP_NOT_POSSIBLE
823832#[ cfg( not( no_global_oom_handling) ) ]
824833#[ stable( feature = "rust1" , since = "1.0.0" ) ]
825834impl < T : Clone > ToOwned for [ T ] {
0 commit comments