@@ -18,7 +18,6 @@ use rustc_ast::ast;
18
18
use rustc_errors:: Applicability ;
19
19
use rustc_hir as hir;
20
20
use rustc_hir:: def:: Res ;
21
- use rustc_hir:: intravisit:: { self , Visitor } ;
22
21
use rustc_hir:: { Expr , ExprKind , PatKind , TraitItem , TraitItemKind , UnOp } ;
23
22
use rustc_lint:: { LateContext , LateLintPass , Lint , LintContext } ;
24
23
use rustc_middle:: lint:: in_external_macro;
@@ -35,7 +34,7 @@ use crate::utils::usage::mutated_variables;
35
34
use crate :: utils:: {
36
35
contains_return, contains_ty, get_parent_expr, get_trait_def_id, has_iter_method, higher, implements_trait,
37
36
in_macro, is_copy, is_expn_of, is_type_diagnostic_item, iter_input_pats, last_path_segment, match_def_path,
38
- match_qpath, match_trait_method, match_type, match_var , meets_msrv, method_calls, method_chain_args,
37
+ match_qpath, match_trait_method, match_type, meets_msrv, method_calls, method_chain_args,
39
38
path_to_local_id, paths, remove_blocks, return_ty, single_segment_path, snippet, snippet_block,
40
39
snippet_with_applicability, snippet_with_macro_callsite, span_lint, span_lint_and_help, span_lint_and_sugg,
41
40
span_lint_and_then, strip_pat_refs, sugg, walk_ptrs_ty_depth, SpanlessEq ,
@@ -3119,9 +3118,7 @@ fn lint_filter_map<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>, is_f
3119
3118
if let ExprKind :: MethodCall ( _, _, [ map_recv, map_arg] , map_span) = expr. kind;
3120
3119
if let ExprKind :: MethodCall ( _, _, [ filter_recv, filter_arg] , filter_span) = map_recv. kind;
3121
3120
let _ = {
3122
- lint_filter_some_map_unwrap( cx, expr, filter_recv, filter_arg,
3123
- map_recv, map_arg, span) ;
3124
- 1
3121
+ lint_filter_some_map_unwrap( cx, expr, filter_recv, filter_arg, map_arg, span) ;
3125
3122
} ;
3126
3123
if match_trait_method( cx, map_recv, & paths:: ITERATOR ) ;
3127
3124
@@ -3240,7 +3237,6 @@ fn lint_filter_some_map_unwrap<'tcx>(
3240
3237
expr : & ' tcx hir:: Expr < ' _ > ,
3241
3238
filter_recv : & ' tcx hir:: Expr < ' _ > ,
3242
3239
filter_arg : & ' tcx hir:: Expr < ' _ > ,
3243
- map_recv : & ' tcx hir:: Expr < ' _ > ,
3244
3240
map_arg : & ' tcx hir:: Expr < ' _ > ,
3245
3241
target_span : Span ,
3246
3242
) {
0 commit comments