macro check for unit_cmp
This commit is contained in:
parent
dc32092ee4
commit
0c74304f7b
@ -85,6 +85,7 @@ impl LintPass for UnitCmp {
|
||||
}
|
||||
|
||||
fn check_expr(&mut self, cx: &Context, expr: &Expr) {
|
||||
if in_macro(expr) { return; }
|
||||
if let ExprBinary(ref cmp, ref left, _) = expr.node {
|
||||
let op = cmp.node;
|
||||
let sty = &cx.tcx.expr_ty(left).sty;
|
||||
|
Loading…
Reference in New Issue
Block a user