File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,7 @@ impl str {
134134 /// ```
135135 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
136136 #[ rustc_const_stable( feature = "const_str_len" , since = "1.39.0" ) ]
137+ #[ cfg_attr( not( test) , rustc_diagnostic_item = "str_len" ) ]
137138 #[ must_use]
138139 #[ inline]
139140 pub const fn len ( & self ) -> usize {
@@ -1157,6 +1158,7 @@ impl str {
11571158 /// assert!(bananas.starts_with(&['a', 'b', 'c', 'd']));
11581159 /// ```
11591160 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1161+ #[ cfg_attr( not( test) , rustc_diagnostic_item = "str_starts_with" ) ]
11601162 pub fn starts_with < P : Pattern > ( & self , pat : P ) -> bool {
11611163 pat. is_prefix_of ( self )
11621164 }
@@ -1181,6 +1183,7 @@ impl str {
11811183 /// assert!(!bananas.ends_with("nana"));
11821184 /// ```
11831185 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1186+ #[ cfg_attr( not( test) , rustc_diagnostic_item = "str_ends_with" ) ]
11841187 pub fn ends_with < P : Pattern > ( & self , pat : P ) -> bool
11851188 where
11861189 for < ' a > P :: Searcher < ' a > : ReverseSearcher < ' a > ,
You can’t perform that action at this time.
0 commit comments