@@ -1732,8 +1732,8 @@ fn lint_unnecessary_fold(cx: &LateContext<'_, '_>, expr: &hir::Expr, fold_args:
1732
1732
if bin_op. node == op;
1733
1733
1734
1734
// Extract the names of the two arguments to the closure
1735
- if let Some ( first_arg_ident) = get_arg_name( & closure_body. arguments [ 0 ] . pat) ;
1736
- if let Some ( second_arg_ident) = get_arg_name( & closure_body. arguments [ 1 ] . pat) ;
1735
+ if let Some ( first_arg_ident) = get_arg_name( & closure_body. params [ 0 ] . pat) ;
1736
+ if let Some ( second_arg_ident) = get_arg_name( & closure_body. params [ 1 ] . pat) ;
1737
1737
1738
1738
if match_var( & * left_expr, first_arg_ident) ;
1739
1739
if replacement_has_args || match_var( & * right_expr, second_arg_ident) ;
@@ -2345,7 +2345,7 @@ fn lint_flat_map_identity<'a, 'tcx>(
2345
2345
if let hir:: ExprKind :: Closure ( _, _, body_id, _, _) = arg_node;
2346
2346
let body = cx. tcx. hir( ) . body( * body_id) ;
2347
2347
2348
- if let hir:: PatKind :: Binding ( _, _, binding_ident, _) = body. arguments [ 0 ] . pat. node;
2348
+ if let hir:: PatKind :: Binding ( _, _, binding_ident, _) = body. params [ 0 ] . pat. node;
2349
2349
if let hir:: ExprKind :: Path ( hir:: QPath :: Resolved ( _, ref path) ) = body. value. node;
2350
2350
2351
2351
if path. segments. len( ) == 1 ;
@@ -2390,7 +2390,7 @@ fn lint_search_is_some<'a, 'tcx>(
2390
2390
if search_method == "find" ;
2391
2391
if let hir:: ExprKind :: Closure ( _, _, body_id, ..) = search_args[ 1 ] . node;
2392
2392
let closure_body = cx. tcx. hir( ) . body( body_id) ;
2393
- if let Some ( closure_arg) = closure_body. arguments . get( 0 ) ;
2393
+ if let Some ( closure_arg) = closure_body. params . get( 0 ) ;
2394
2394
if let hir:: PatKind :: Ref ( ..) = closure_arg. pat. node;
2395
2395
then {
2396
2396
Some ( search_snippet. replacen( '&' , "" , 1 ) )
0 commit comments