@@ -2195,7 +2195,9 @@ where
2195
2195
2196
2196
#[ cfg( not( no_global_oom_handling) ) ]
2197
2197
#[ stable( feature = "box_str2" , since = "1.45.0" ) ]
2198
- impl Extend < Box < str > > for String {
2198
+ impl < const COOP_PREFERRED : bool > Extend < Box < str > > for String < COOP_PREFERRED >
2199
+ where [ ( ) ; crate :: co_alloc_metadata_num_slots_with_preference_global ( COOP_PREFERRED ) ] : ,
2200
+ {
2199
2201
fn extend < I : IntoIterator < Item = Box < str > > > ( & mut self , iter : I ) {
2200
2202
iter. into_iter ( ) . for_each ( move |s| self . push_str ( & s) ) ;
2201
2203
}
@@ -2782,7 +2784,10 @@ where
2782
2784
2783
2785
#[ cfg( not( no_global_oom_handling) ) ]
2784
2786
#[ stable( feature = "string_to_string_specialization" , since = "1.17.0" ) ]
2785
- impl < const COOP_PREFERRED : bool > ToString < COOP_PREFERRED > for String < COOP_PREFERRED > {
2787
+ impl < const COOP_PREFERRED : bool > ToString < COOP_PREFERRED > for String < COOP_PREFERRED >
2788
+ where
2789
+ [ ( ) ; crate :: co_alloc_metadata_num_slots_with_preference_global ( COOP_PREFERRED ) ] : ,
2790
+ {
2786
2791
#[ inline]
2787
2792
fn to_string ( & self ) -> String < COOP_PREFERRED > {
2788
2793
self . to_owned ( )
@@ -2870,7 +2875,9 @@ where
2870
2875
// note: test pulls in std, which causes errors here
2871
2876
#[ cfg( not( test) ) ]
2872
2877
#[ stable( feature = "string_from_box" , since = "1.18.0" ) ]
2873
- impl From < Box < str > > for String {
2878
+ impl < const COOP_PREFERRED : bool > From < Box < str > > for String < COOP_PREFERRED >
2879
+ where [ ( ) ; crate :: co_alloc_metadata_num_slots_with_preference_global ( COOP_PREFERRED ) ] : ,
2880
+ {
2874
2881
/// Converts the given boxed `str` slice to a [`String`].
2875
2882
/// It is notable that the `str` slice is owned.
2876
2883
///
0 commit comments