We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a513173 commit 4b8cf55Copy full SHA for 4b8cf55
clippy_lints/src/borrow_deref_ref.rs
@@ -56,6 +56,7 @@ impl LateLintPass<'_> for BorrowDerefRef {
56
if !e.span.from_expansion();
57
if let ExprKind::AddrOf(_, Mutability::Not, addrof_expr) = e.kind;
58
if let ExprKind::Unary(UnOp::Deref, deref_expr) = addrof_expr.kind;
59
+ if !deref_expr.span.from_expansion();
60
if !matches!(deref_expr.kind, ExprKind::Unary(UnOp::Deref, ..) );
61
let ref_ty = cx.typeck_results().expr_ty(deref_expr);
62
if let ty::Ref(_, inner_ty, Mutability::Not) = ref_ty.kind();
0 commit comments