@@ -13,6 +13,7 @@ use rustc::hir::intravisit::{self, Visitor};
13
13
use rustc:: lint:: { in_external_macro, LateContext , LateLintPass , Lint , LintArray , LintContext , LintPass } ;
14
14
use rustc:: ty:: { self , Predicate , Ty } ;
15
15
use rustc:: { declare_lint_pass, declare_tool_lint} ;
16
+ use crate :: rustc_data_structures:: fx:: FxHashMap ;
16
17
use rustc_errors:: Applicability ;
17
18
use syntax:: ast;
18
19
use syntax:: source_map:: { BytePos , Span } ;
@@ -2052,10 +2053,10 @@ fn lint_filter_map<'a, 'tcx>(
2052
2053
if_chain ! {
2053
2054
if match_trait_method( cx, expr, & paths:: ITERATOR ) ;
2054
2055
if let hir:: ExprKind :: Closure ( _, _, ref map_body_id, _, _) = map_args[ 1 ] . node;
2055
- if let hir:: ExprKind :: MethodCall ( ref map_ps, _, _) = cx. tcx. hir. body( * map_body_id) . value. node;
2056
- if map_ps. ident. name == "unwrap" . to_string ( ) ;
2056
+ if let hir:: ExprKind :: MethodCall ( ref map_ps, _, _) = cx. tcx. hir( ) . body( * map_body_id) . value. node;
2057
+ if map_ps. ident. name == sym! ( unwrap ) ;
2057
2058
if let hir:: ExprKind :: Closure ( _, _, ref filter_body_id, _, _) = filter_args[ 1 ] . node;
2058
- if let hir:: ExprKind :: MethodCall ( ref filter_ps, _, _) = cx. tcx. hir. body( * filter_body_id) . value. node;
2059
+ if let hir:: ExprKind :: MethodCall ( ref filter_ps, _, _) = cx. tcx. hir( ) . body( * filter_body_id) . value. node;
2059
2060
if responses. contains_key( & filter_ps. ident. name. to_string( ) ) ;
2060
2061
if let hir:: ExprKind :: MethodCall ( _, _, ref expr_vec) = expr. node;
2061
2062
if let hir:: ExprKind :: MethodCall ( _, ref filter_span, _) = expr_vec[ 0 ] . node;
0 commit comments