@@ -848,10 +848,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
848
848
}
849
849
}
850
850
851
- fn with_catch_scope < T , F > ( & mut self , catch_id : NodeId , f : F ) -> T
852
- where
853
- F : FnOnce ( & mut Self ) -> T ,
854
- {
851
+ fn with_catch_scope < T > ( & mut self , catch_id : NodeId , f : impl FnOnce ( & mut Self ) -> T ) -> T {
855
852
let len = self . catch_scopes . len ( ) ;
856
853
self . catch_scopes . push ( catch_id) ;
857
854
@@ -867,10 +864,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
867
864
result
868
865
}
869
866
870
- fn with_loop_scope < T , F > ( & mut self , loop_id : NodeId , f : F ) -> T
871
- where
872
- F : FnOnce ( & mut Self ) -> T ,
873
- {
867
+ fn with_loop_scope < T > ( & mut self , loop_id : NodeId , f : impl FnOnce ( & mut Self ) -> T ) -> T {
874
868
// We're no longer in the base loop's condition; we're in another loop.
875
869
let was_in_loop_condition = self . is_in_loop_condition ;
876
870
self . is_in_loop_condition = false ;
@@ -892,10 +886,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
892
886
result
893
887
}
894
888
895
- fn with_loop_condition_scope < T , F > ( & mut self , f : F ) -> T
896
- where
897
- F : FnOnce ( & mut Self ) -> T ,
898
- {
889
+ fn with_loop_condition_scope < T > ( & mut self , f : impl FnOnce ( & mut Self ) -> T ) -> T {
899
890
let was_in_loop_condition = self . is_in_loop_condition ;
900
891
self . is_in_loop_condition = true ;
901
892
0 commit comments