From a13f43a76a489e82eb1349148538712d45d96531 Mon Sep 17 00:00:00 2001 From: lengyijun Date: Tue, 10 May 2022 14:54:51 +0000 Subject: [PATCH] add comment --- clippy_lints/src/borrow_deref_ref.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/clippy_lints/src/borrow_deref_ref.rs b/clippy_lints/src/borrow_deref_ref.rs index 7a95399f4253..219acd8a31d8 100644 --- a/clippy_lints/src/borrow_deref_ref.rs +++ b/clippy_lints/src/borrow_deref_ref.rs @@ -63,6 +63,7 @@ impl LateLintPass<'_> for BorrowDerefRef { then{ if let Some(parent_expr) = get_parent_expr(cx, e){ + // modification to `&mut &*x` is different from `&mut x` if matches!(deref_target.kind, ExprKind::Path(..) | ExprKind::Field(..) | ExprKind::Index(..)