From 09022bbd4515ba12edb4188dac221b1b068ee981 Mon Sep 17 00:00:00 2001 From: lapla-cogito Date: Sat, 28 Dec 2024 22:41:29 +0900 Subject: [PATCH] fix arguments of ExprKind::MethodCall --- book/src/development/method_checking.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/development/method_checking.md b/book/src/development/method_checking.md index 9c5d4b516db2..b3126024b990 100644 --- a/book/src/development/method_checking.md +++ b/book/src/development/method_checking.md @@ -21,7 +21,7 @@ use clippy_utils::is_trait_method; impl<'tcx> LateLintPass<'tcx> for OurFancyMethodLint { fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { // Check our expr is calling a method with pattern matching - if let hir::ExprKind::MethodCall(path, _, [self_arg, ..]) = &expr.kind + if let hir::ExprKind::MethodCall(path, _, [self_arg, ..], _) = &expr.kind // Check if the name of this method is `our_fancy_method` && path.ident.name.as_str() == "our_fancy_method" // We can check the type of the self argument whenever necessary.