@@ -3609,8 +3609,8 @@ impl From<char> for String {
36093609
36103610// In place case changes
36113611
3612+ #[ cfg( not( no_global_oom_handling) ) ]
36123613impl String {
3613- #[ cfg( not( no_global_oom_handling) ) ]
36143614 fn case_change_while_ascii < const MAKE_UPPER : bool > ( & mut self ) -> ControlFlow < usize > {
36153615 // SAFETY the as_bytes_mut is unsafe but we will only do ascii case change in place with it
36163616 unsafe {
@@ -3672,7 +3672,6 @@ impl String {
36723672 ///
36733673 /// assert_eq!("TSCHÜSS", s);
36743674 /// ```
3675- #[ cfg( not( no_global_oom_handling) ) ]
36763675 #[ unstable( feature = "string_make_uplowercase" , issue = "135885" ) ]
36773676 pub fn make_uppercase ( & mut self ) {
36783677 let ControlFlow :: Break ( non_utf8_offset) = self . case_change_while_ascii :: < true > ( ) else {
@@ -3729,7 +3728,6 @@ impl String {
37293728 ///
37303729 /// assert_eq!("农历新年", new_year);
37313730 /// ```
3732- #[ cfg( not( no_global_oom_handling) ) ]
37333731 #[ unstable( feature = "string_make_uplowercase" , issue = "135885" ) ]
37343732 pub fn make_lowercase ( & mut self ) {
37353733 fn update_word_final ( word_final_so_far : bool , u_c : char ) -> bool {
@@ -3769,6 +3767,7 @@ impl String {
37693767
37703768/// A helper for in place modification of strings, where we gradually "pop" characters,
37713769/// hereby making room to write back to the string buffer
3770+ #[ cfg( not( no_global_oom_handling) ) ]
37723771#[ unstable( issue = "none" , feature = "std_internals" ) ]
37733772struct WriteChars < ' a > {
37743773 // This is the internal buffer of the string temporarily changed to Vec<u8> because
@@ -3786,6 +3785,7 @@ struct WriteChars<'a> {
37863785 buffer : VecDeque < u8 > ,
37873786}
37883787
3788+ #[ cfg( not( no_global_oom_handling) ) ]
37893789#[ unstable( issue = "none" , feature = "std_internals" ) ]
37903790impl < ' a > WriteChars < ' a > {
37913791 fn new ( s : & ' a mut String , offset : usize ) -> Self {
0 commit comments