We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc008aa commit ceea201Copy full SHA for ceea201
clippy_lints/src/reference.rs
@@ -38,8 +38,10 @@ fn without_parens(mut e: &Expr) -> &Expr {
38
39
impl EarlyLintPass for Pass {
40
fn check_expr(&mut self, cx: &EarlyContext, e: &Expr) {
41
- if let ExprKind::Unary(UnOp::Deref, ref deref_target) = e.node {
42
- if let ExprKind::AddrOf(_, ref addrof_target) = without_parens(deref_target).node {
+ if_chain! {
+ if let ExprKind::Unary(UnOp::Deref, ref deref_target) = e.node;
43
+ if let ExprKind::AddrOf(_, ref addrof_target) = without_parens(deref_target).node;
44
+ then {
45
span_lint_and_sugg(
46
cx,
47
DEREF_ADDROF,
0 commit comments