about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTeddy_Wang <wangtheo662@gmail.com>2020-06-23 11:40:38 -0400
committerTeddy_Wang <wangtheo662@gmail.com>2020-06-23 11:40:38 -0400
commitfb4f9a0ad7a4656beb01c85b02b3e6ef15d914ec (patch)
treeed356bf08562c682def98cae56ffa63cd6bdf11a
parent40ee620e51c86c72e3c2b65df71f5f0a4a79797f (diff)
downloadrust-fb4f9a0ad7a4656beb01c85b02b3e6ef15d914ec.tar.gz
rust-fb4f9a0ad7a4656beb01c85b02b3e6ef15d914ec.zip
Fix pattern match of ExprKind::MethodCall
-rw-r--r--clippy_lints/src/map_identity.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/map_identity.rs b/clippy_lints/src/map_identity.rs
index 9bc8f1bec1b..6607a26b130 100644
--- a/clippy_lints/src/map_identity.rs
+++ b/clippy_lints/src/map_identity.rs
@@ -61,7 +61,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MapIdentity {
 /// map(). Otherwise, returns None.
 fn get_map_argument<'a>(cx: &LateContext<'_, '_>, expr: &'a Expr<'a>) -> Option<&'a [Expr<'a>]> {
     if_chain! {
-        if let ExprKind::MethodCall(ref method, _, ref args) = expr.kind;
+        if let ExprKind::MethodCall(ref method, _, ref args, _) = expr.kind;
         if args.len() == 2 && method.ident.as_str() == "map";
         let caller_ty = cx.tables.expr_ty(&args[0]);
         if match_trait_method(cx, expr, &paths::ITERATOR)