macro check for unit_cmp

This commit is contained in:
Andre Bogus 2015-09-06 19:41:09 +02:00
parent dc32092ee4
commit 0c74304f7b

View File

@ -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;