diff options
| author | Jason Newcomb <jsnewcomb@pm.me> | 2022-02-16 23:14:39 -0500 |
|---|---|---|
| committer | flip1995 <philipp.krones@embecosm.com> | 2022-02-17 16:21:53 +0100 |
| commit | 7fa0c206272976c3b26b4d1ec6824a3c4d1859a7 (patch) | |
| tree | 3d7237a218d8791e3fbdbf9e47978c0c97e6d24c /src/tools/clippy/clippy_lints | |
| parent | 582b6964a8868c9714881d9821d08415a8f4f13b (diff) | |
| download | rust-7fa0c206272976c3b26b4d1ec6824a3c4d1859a7.tar.gz rust-7fa0c206272976c3b26b4d1ec6824a3c4d1859a7.zip | |
Don't lint `needless_borrow` in method receiver positions
Diffstat (limited to 'src/tools/clippy/clippy_lints')
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/dereference.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/clippy/clippy_lints/src/dereference.rs b/src/tools/clippy/clippy_lints/src/dereference.rs index 6d0851d804c..fe391198342 100644 --- a/src/tools/clippy/clippy_lints/src/dereference.rs +++ b/src/tools/clippy/clippy_lints/src/dereference.rs @@ -528,7 +528,7 @@ fn is_auto_reborrow_position(parent: Option<Node<'_>>) -> bool { fn is_auto_borrow_position(parent: Option<Node<'_>>, child_id: HirId) -> bool { if let Some(Node::Expr(parent)) = parent { match parent.kind { - ExprKind::MethodCall(_, [self_arg, ..], _) => self_arg.hir_id == child_id, + // ExprKind::MethodCall(_, [self_arg, ..], _) => self_arg.hir_id == child_id, ExprKind::Field(..) => true, ExprKind::Call(f, _) => f.hir_id == child_id, _ => false, |
