Merge pull request #308 from Manishearth/unit_cmp
macro check for unit_cmp
This commit is contained in:
commit
1569fd8c55
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue