@@ -1712,6 +1712,7 @@ impl str {
17121712 ///
17131713 /// assert_eq!("Hello\tworld", s.trim());
17141714 /// ```
1715+ #[ inline]
17151716 #[ must_use = "this returns the trimmed string as a slice, \
17161717 without modifying the original"]
17171718 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -1749,6 +1750,7 @@ impl str {
17491750 /// let s = " עברית ";
17501751 /// assert!(Some('ע') == s.trim_start().chars().next());
17511752 /// ```
1753+ #[ inline]
17521754 #[ must_use = "this returns the trimmed string as a new slice, \
17531755 without modifying the original"]
17541756 #[ stable( feature = "trim_direction" , since = "1.30.0" ) ]
@@ -1786,6 +1788,7 @@ impl str {
17861788 /// let s = " עברית ";
17871789 /// assert!(Some('ת') == s.trim_end().chars().rev().next());
17881790 /// ```
1791+ #[ inline]
17891792 #[ must_use = "this returns the trimmed string as a new slice, \
17901793 without modifying the original"]
17911794 #[ stable( feature = "trim_direction" , since = "1.30.0" ) ]
@@ -1824,6 +1827,7 @@ impl str {
18241827 /// let s = " עברית";
18251828 /// assert!(Some('ע') == s.trim_left().chars().next());
18261829 /// ```
1830+ #[ inline]
18271831 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
18281832 #[ rustc_deprecated(
18291833 since = "1.33.0" ,
@@ -1865,6 +1869,7 @@ impl str {
18651869 /// let s = "עברית ";
18661870 /// assert!(Some('ת') == s.trim_right().chars().rev().next());
18671871 /// ```
1872+ #[ inline]
18681873 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
18691874 #[ rustc_deprecated(
18701875 since = "1.33.0" ,
@@ -2260,6 +2265,7 @@ impl str {
22602265 /// assert_eq!("GRüßE, JüRGEN ❤", s);
22612266 /// ```
22622267 #[ stable( feature = "ascii_methods_on_intrinsics" , since = "1.23.0" ) ]
2268+ #[ inline]
22632269 pub fn make_ascii_uppercase ( & mut self ) {
22642270 // SAFETY: safe because we transmute two types with the same layout.
22652271 let me = unsafe { self . as_bytes_mut ( ) } ;
@@ -2286,6 +2292,7 @@ impl str {
22862292 /// assert_eq!("grÜße, jÜrgen ❤", s);
22872293 /// ```
22882294 #[ stable( feature = "ascii_methods_on_intrinsics" , since = "1.23.0" ) ]
2295+ #[ inline]
22892296 pub fn make_ascii_lowercase ( & mut self ) {
22902297 // SAFETY: safe because we transmute two types with the same layout.
22912298 let me = unsafe { self . as_bytes_mut ( ) } ;
@@ -2423,6 +2430,7 @@ impl AsRef<[u8]> for str {
24232430#[ stable( feature = "rust1" , since = "1.0.0" ) ]
24242431impl Default for & str {
24252432 /// Creates an empty str
2433+ #[ inline]
24262434 fn default ( ) -> Self {
24272435 ""
24282436 }
@@ -2431,6 +2439,7 @@ impl Default for &str {
24312439#[ stable( feature = "default_mut_str" , since = "1.28.0" ) ]
24322440impl Default for & mut str {
24332441 /// Creates an empty mutable str
2442+ #[ inline]
24342443 fn default ( ) -> Self {
24352444 // SAFETY: The empty string is valid UTF-8.
24362445 unsafe { from_utf8_unchecked_mut ( & mut [ ] ) }
0 commit comments