@@ -2080,8 +2080,7 @@ pub trait Iterator {
2080
2080
fn try_collect < B > ( & mut self ) -> ChangeOutputType < Self :: Item , B >
2081
2081
where
2082
2082
Self : Sized ,
2083
- <Self as Iterator >:: Item : Try ,
2084
- <<Self as Iterator >:: Item as Try >:: Residual : Residual < B > ,
2083
+ Self :: Item : Try < Residual : Residual < B > > ,
2085
2084
B : FromIterator < <Self :: Item as Try >:: Output > ,
2086
2085
{
2087
2086
try_process ( ByRefSized ( self ) , |i| i. collect ( ) )
@@ -2689,12 +2688,13 @@ pub trait Iterator {
2689
2688
#[ inline]
2690
2689
#[ unstable( feature = "iterator_try_reduce" , reason = "new API" , issue = "87053" ) ]
2691
2690
#[ rustc_do_not_const_check]
2692
- fn try_reduce < F , R > ( & mut self , f : F ) -> ChangeOutputType < R , Option < R :: Output > >
2691
+ fn try_reduce < R > (
2692
+ & mut self ,
2693
+ f : impl FnMut ( Self :: Item , Self :: Item ) -> R ,
2694
+ ) -> ChangeOutputType < R , Option < R :: Output > >
2693
2695
where
2694
2696
Self : Sized ,
2695
- F : FnMut ( Self :: Item , Self :: Item ) -> R ,
2696
- R : Try < Output = Self :: Item > ,
2697
- R :: Residual : Residual < Option < Self :: Item > > ,
2697
+ R : Try < Output = Self :: Item , Residual : Residual < Option < Self :: Item > > > ,
2698
2698
{
2699
2699
let first = match self . next ( ) {
2700
2700
Some ( i) => i,
@@ -2956,12 +2956,13 @@ pub trait Iterator {
2956
2956
#[ inline]
2957
2957
#[ unstable( feature = "try_find" , reason = "new API" , issue = "63178" ) ]
2958
2958
#[ rustc_do_not_const_check]
2959
- fn try_find < F , R > ( & mut self , f : F ) -> ChangeOutputType < R , Option < Self :: Item > >
2959
+ fn try_find < R > (
2960
+ & mut self ,
2961
+ f : impl FnMut ( & Self :: Item ) -> R ,
2962
+ ) -> ChangeOutputType < R , Option < Self :: Item > >
2960
2963
where
2961
2964
Self : Sized ,
2962
- F : FnMut ( & Self :: Item ) -> R ,
2963
- R : Try < Output = bool > ,
2964
- R :: Residual : Residual < Option < Self :: Item > > ,
2965
+ R : Try < Output = bool , Residual : Residual < Option < Self :: Item > > > ,
2965
2966
{
2966
2967
#[ inline]
2967
2968
fn check < I , V , R > (
0 commit comments