Merge pull request #290 from Manishearth/float-cmp

also ignore `ne` functions
This commit is contained in:
Manish Goregaokar
2015-09-03 15:49:54 +05:30
+5 -2
View File
@@ -98,8 +98,11 @@ fn check_expr(&mut self, cx: &Context, expr: &Expr) {
Some(NodeTraitItem(&TraitItem{ id: _, ref ident, .. })) |
Some(NodeImplItem(&ImplItem{ id: _, ref ident, .. })) => {
let name = ident.name.as_str();
if &*name == "eq" || name.starts_with("eq_") ||
name.ends_with("_eq") { return; }
if &*name == "eq" || &*name == "ne" ||
name.starts_with("eq_") ||
name.ends_with("_eq") {
return;
}
},
_ => (),
}