StmtKind
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user