Add lint for redundant pattern matching in iflet for Result/Option

This commit is contained in:
d-dorazio
2016-10-29 18:56:12 +02:00
parent 502416fa78
commit d213040381
13 changed files with 339 additions and 186 deletions

View File

@@ -49,7 +49,7 @@ impl LintPass for Arithmetic {
impl LateLintPass for Arithmetic {
fn check_expr(&mut self, cx: &LateContext, expr: &hir::Expr) {
if let Some(_) = self.span {
if self.span.is_some() {
return;
}
match expr.node {