@@ -1497,10 +1497,7 @@ impl String {
14971497/// ``` 
14981498#[ cfg( not( no_global_oom_handling) ) ]  
14991499    #[ unstable( feature = "string_remove_matches" ,  reason = "new API" ,  issue = "72826" ) ]  
1500-     pub  fn  remove_matches < ' a ,  P > ( & ' a  mut  self ,  pat :  P ) 
1501-     where 
1502-         P :  for < ' x >  Pattern < ' x > , 
1503-     { 
1500+     pub  fn  remove_matches < P :  Pattern > ( & mut  self ,  pat :  P )  { 
15041501        use  core:: str:: pattern:: Searcher ; 
15051502
15061503        let  rejections = { 
@@ -2288,35 +2285,41 @@ impl<'a> Extend<Cow<'a, str>> for String {
22882285    reason = "API not fully fleshed out and ready to be stabilized" ,  
22892286    issue = "27721"  
22902287) ] 
2291- impl < ' a ,   ' b >  Pattern < ' a >  for  & ' b  String  { 
2292-     type  Searcher  = <& ' b  str  as  Pattern < ' a > > :: Searcher ; 
2288+ impl < ' b >  Pattern  for  & ' b  String  { 
2289+     type  Searcher < ' a >  = <& ' b  str  as  Pattern > :: Searcher < ' a > ; 
22932290
2294-     fn  into_searcher ( self ,  haystack :  & ' a   str )  -> <& ' b  str  as  Pattern < ' a > > :: Searcher  { 
2291+     fn  into_searcher ( self ,  haystack :  & str )  -> <& ' b  str  as  Pattern > :: Searcher < ' _ >  { 
22952292        self [ ..] . into_searcher ( haystack) 
22962293    } 
22972294
22982295    #[ inline]  
2299-     fn  is_contained_in ( self ,  haystack :  & ' a   str )  -> bool  { 
2296+     fn  is_contained_in ( self ,  haystack :  & str )  -> bool  { 
23002297        self [ ..] . is_contained_in ( haystack) 
23012298    } 
23022299
23032300    #[ inline]  
2304-     fn  is_prefix_of ( self ,  haystack :  & ' a   str )  -> bool  { 
2301+     fn  is_prefix_of ( self ,  haystack :  & str )  -> bool  { 
23052302        self [ ..] . is_prefix_of ( haystack) 
23062303    } 
23072304
23082305    #[ inline]  
2309-     fn  strip_prefix_of ( self ,  haystack :  & ' a   str )  -> Option < & ' a   str >  { 
2306+     fn  strip_prefix_of ( self ,  haystack :  & str )  -> Option < & str >  { 
23102307        self [ ..] . strip_prefix_of ( haystack) 
23112308    } 
23122309
23132310    #[ inline]  
2314-     fn  is_suffix_of ( self ,  haystack :  & ' a  str )  -> bool  { 
2311+     fn  is_suffix_of < ' a > ( self ,  haystack :  & ' a  str )  -> bool 
2312+     where 
2313+         Self :: Searcher < ' a > :  core:: str:: pattern:: ReverseSearcher < ' a > , 
2314+     { 
23152315        self [ ..] . is_suffix_of ( haystack) 
23162316    } 
23172317
23182318    #[ inline]  
2319-     fn  strip_suffix_of ( self ,  haystack :  & ' a  str )  -> Option < & ' a  str >  { 
2319+     fn  strip_suffix_of < ' a > ( self ,  haystack :  & ' a  str )  -> Option < & str > 
2320+     where 
2321+         Self :: Searcher < ' a > :  core:: str:: pattern:: ReverseSearcher < ' a > , 
2322+     { 
23202323        self [ ..] . strip_suffix_of ( haystack) 
23212324    } 
23222325} 
0 commit comments