mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
16 lines
546 B
Plaintext
16 lines
546 B
Plaintext
if_chain! {
|
|
if let ExprKind::Binary(ref op, ref left, ref right) = expr.node;
|
|
if BinOpKind::Eq == op.node;
|
|
if let ExprKind::Binary(ref op1, ref left1, ref right1) = left.node;
|
|
if BinOpKind::BitAnd == op1.node;
|
|
if let ExprKind::Path(ref path) = left1.node;
|
|
if match_qpath(path, &["x"]);
|
|
if let ExprKind::Lit(ref lit) = right1.node;
|
|
if let LitKind::Int(15, _) = lit.node;
|
|
if let ExprKind::Lit(ref lit1) = right.node;
|
|
if let LitKind::Int(0, _) = lit1.node;
|
|
then {
|
|
// report your lint here
|
|
}
|
|
}
|