@@ -1712,6 +1712,7 @@ impl str {
1712
1712
///
1713
1713
/// assert_eq!("Hello\tworld", s.trim());
1714
1714
/// ```
1715
+ #[ inline]
1715
1716
#[ must_use = "this returns the trimmed string as a slice, \
1716
1717
without modifying the original"]
1717
1718
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -1749,6 +1750,7 @@ impl str {
1749
1750
/// let s = " עברית ";
1750
1751
/// assert!(Some('ע') == s.trim_start().chars().next());
1751
1752
/// ```
1753
+ #[ inline]
1752
1754
#[ must_use = "this returns the trimmed string as a new slice, \
1753
1755
without modifying the original"]
1754
1756
#[ stable( feature = "trim_direction" , since = "1.30.0" ) ]
@@ -1786,6 +1788,7 @@ impl str {
1786
1788
/// let s = " עברית ";
1787
1789
/// assert!(Some('ת') == s.trim_end().chars().rev().next());
1788
1790
/// ```
1791
+ #[ inline]
1789
1792
#[ must_use = "this returns the trimmed string as a new slice, \
1790
1793
without modifying the original"]
1791
1794
#[ stable( feature = "trim_direction" , since = "1.30.0" ) ]
@@ -1824,6 +1827,7 @@ impl str {
1824
1827
/// let s = " עברית";
1825
1828
/// assert!(Some('ע') == s.trim_left().chars().next());
1826
1829
/// ```
1830
+ #[ inline]
1827
1831
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1828
1832
#[ rustc_deprecated(
1829
1833
since = "1.33.0" ,
@@ -1865,6 +1869,7 @@ impl str {
1865
1869
/// let s = "עברית ";
1866
1870
/// assert!(Some('ת') == s.trim_right().chars().rev().next());
1867
1871
/// ```
1872
+ #[ inline]
1868
1873
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1869
1874
#[ rustc_deprecated(
1870
1875
since = "1.33.0" ,
@@ -2260,6 +2265,7 @@ impl str {
2260
2265
/// assert_eq!("GRüßE, JüRGEN ❤", s);
2261
2266
/// ```
2262
2267
#[ stable( feature = "ascii_methods_on_intrinsics" , since = "1.23.0" ) ]
2268
+ #[ inline]
2263
2269
pub fn make_ascii_uppercase ( & mut self ) {
2264
2270
// SAFETY: safe because we transmute two types with the same layout.
2265
2271
let me = unsafe { self . as_bytes_mut ( ) } ;
@@ -2286,6 +2292,7 @@ impl str {
2286
2292
/// assert_eq!("grÜße, jÜrgen ❤", s);
2287
2293
/// ```
2288
2294
#[ stable( feature = "ascii_methods_on_intrinsics" , since = "1.23.0" ) ]
2295
+ #[ inline]
2289
2296
pub fn make_ascii_lowercase ( & mut self ) {
2290
2297
// SAFETY: safe because we transmute two types with the same layout.
2291
2298
let me = unsafe { self . as_bytes_mut ( ) } ;
@@ -2423,6 +2430,7 @@ impl AsRef<[u8]> for str {
2423
2430
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2424
2431
impl Default for & str {
2425
2432
/// Creates an empty str
2433
+ #[ inline]
2426
2434
fn default ( ) -> Self {
2427
2435
""
2428
2436
}
@@ -2431,6 +2439,7 @@ impl Default for &str {
2431
2439
#[ stable( feature = "default_mut_str" , since = "1.28.0" ) ]
2432
2440
impl Default for & mut str {
2433
2441
/// Creates an empty mutable str
2442
+ #[ inline]
2434
2443
fn default ( ) -> Self {
2435
2444
// SAFETY: The empty string is valid UTF-8.
2436
2445
unsafe { from_utf8_unchecked_mut ( & mut [ ] ) }
0 commit comments