2017-10-23 14:20:37 -05:00
|
|
|
if_chain! {
|
2018-07-12 02:30:57 -05:00
|
|
|
if let ExprKind::Binary(ref op, ref left, ref right) = expr.node;
|
2018-07-12 02:50:09 -05:00
|
|
|
if BinOpKind::Eq == op.node;
|
2018-07-12 02:30:57 -05:00
|
|
|
if let ExprKind::Binary(ref op1, ref left1, ref right1) = left.node;
|
2018-07-12 02:50:09 -05:00
|
|
|
if BinOpKind::BitAnd == op1.node;
|
2018-07-12 02:30:57 -05:00
|
|
|
if let ExprKind::Path(ref path) = left1.node;
|
2017-10-23 14:20:37 -05:00
|
|
|
if match_qpath(path, &["x"]);
|
2018-07-12 02:30:57 -05:00
|
|
|
if let ExprKind::Lit(ref lit) = right1.node;
|
2017-10-23 14:20:37 -05:00
|
|
|
if let LitKind::Int(15, _) = lit.node;
|
2018-07-12 02:30:57 -05:00
|
|
|
if let ExprKind::Lit(ref lit1) = right.node;
|
2017-10-23 14:20:37 -05:00
|
|
|
if let LitKind::Int(0, _) = lit1.node;
|
|
|
|
then {
|
|
|
|
// report your lint here
|
|
|
|
}
|
|
|
|
}
|