This commit is contained in:
csmoe
2018-07-12 16:53:53 +08:00
committed by Oliver Schneider
parent 12ded030b6
commit 8cf463fe93
23 changed files with 66 additions and 66 deletions

View File

@@ -269,7 +269,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
fn check_stmt(&mut self, cx: &LateContext<'a, 'tcx>, s: &'tcx Stmt) {
if_chain! {
if let StmtDecl(ref d, _) = s.node;
if let StmtKind::Decl(ref d, _) = s.node;
if let DeclLocal(ref l) = d.node;
if let PatKind::Binding(an, _, i, None) = l.pat.node;
if let Some(ref init) = l.init;
@@ -303,7 +303,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
}
};
if_chain! {
if let StmtSemi(ref expr, _) = s.node;
if let StmtKind::Semi(ref expr, _) = s.node;
if let ExprKind::Binary(ref binop, ref a, ref b) = expr.node;
if binop.node == BinOpKind::And || binop.node == BinOpKind::Or;
if let Some(sugg) = Sugg::hir_opt(cx, a);