Merge pull request #308 from Manishearth/unit_cmp
macro check for unit_cmp
This commit is contained in:
@@ -85,6 +85,7 @@ impl LintPass for UnitCmp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn check_expr(&mut self, cx: &Context, expr: &Expr) {
|
fn check_expr(&mut self, cx: &Context, expr: &Expr) {
|
||||||
|
if in_macro(cx, expr.span) { return; }
|
||||||
if let ExprBinary(ref cmp, ref left, _) = expr.node {
|
if let ExprBinary(ref cmp, ref left, _) = expr.node {
|
||||||
let op = cmp.node;
|
let op = cmp.node;
|
||||||
let sty = &cx.tcx.expr_ty(left).sty;
|
let sty = &cx.tcx.expr_ty(left).sty;
|
||||||
|
|||||||
Reference in New Issue
Block a user