@@ -904,6 +904,7 @@ impl str {
904904 #[ must_use = "this returns the split string as an iterator, \
905905 without modifying the original"]
906906 #[ stable( feature = "split_whitespace" , since = "1.1.0" ) ]
907+ #[ cfg_attr( not( test) , rustc_diagnostic_item = "str_split_whitespace" ) ]
907908 #[ inline]
908909 pub fn split_whitespace ( & self ) -> SplitWhitespace < ' _ > {
909910 SplitWhitespace { inner : self . split ( IsWhitespace ) . filter ( IsNotEmpty ) }
@@ -1846,6 +1847,7 @@ impl str {
18461847 #[ must_use = "this returns the trimmed string as a slice, \
18471848 without modifying the original"]
18481849 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1850+ #[ cfg_attr( not( test) , rustc_diagnostic_item = "str_trim" ) ]
18491851 pub fn trim ( & self ) -> & str {
18501852 self . trim_matches ( |c : char | c. is_whitespace ( ) )
18511853 }
@@ -1884,6 +1886,7 @@ impl str {
18841886 #[ must_use = "this returns the trimmed string as a new slice, \
18851887 without modifying the original"]
18861888 #[ stable( feature = "trim_direction" , since = "1.30.0" ) ]
1889+ #[ cfg_attr( not( test) , rustc_diagnostic_item = "str_trim_start" ) ]
18871890 pub fn trim_start ( & self ) -> & str {
18881891 self . trim_start_matches ( |c : char | c. is_whitespace ( ) )
18891892 }
@@ -1922,6 +1925,7 @@ impl str {
19221925 #[ must_use = "this returns the trimmed string as a new slice, \
19231926 without modifying the original"]
19241927 #[ stable( feature = "trim_direction" , since = "1.30.0" ) ]
1928+ #[ cfg_attr( not( test) , rustc_diagnostic_item = "str_trim_end" ) ]
19251929 pub fn trim_end ( & self ) -> & str {
19261930 self . trim_end_matches ( |c : char | c. is_whitespace ( ) )
19271931 }
0 commit comments