mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 00:47:16 +00:00
15 lines
549 B
Text
15 lines
549 B
Text
if_chain! {
|
|
if let Expr_::ExprBinary(ref op, ref left, ref right) = expr.node;
|
|
if BinOp_::BiEq == op.node;
|
|
if let Expr_::ExprBinary(ref op1, ref left1, ref right1) = left.node;
|
|
if BinOp_::BiBitAnd == op1.node;
|
|
if let Expr_::ExprPath(ref path) = left1.node;
|
|
if match_qpath(path, &["x"]);
|
|
if let Expr_::ExprLit(ref lit) = right1.node;
|
|
if let LitKind::Int(15, _) = lit.node;
|
|
if let Expr_::ExprLit(ref lit1) = right.node;
|
|
if let LitKind::Int(0, _) = lit1.node;
|
|
then {
|
|
// report your lint here
|
|
}
|
|
}
|