]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/erasing_op.rs
Merge branch 'macro-use' into HEAD
[rust.git] / clippy_lints / src / erasing_op.rs
index faf297fd5b257cfcb53360952435bdf22dc0e465..102769a375e18d9a40b6f51ac4b8c65af662de83 100644 (file)
@@ -1,6 +1,7 @@
 use crate::consts::{constant_simple, Constant};
 use rustc::hir::*;
 use rustc::lint::*;
+use rustc::{declare_lint, lint_array};
 use syntax::codemap::Span;
 use crate::utils::{in_macro, span_lint};
 
@@ -36,13 +37,13 @@ fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr) {
         if in_macro(e.span) {
             return;
         }
-        if let ExprBinary(ref cmp, ref left, ref right) = e.node {
+        if let ExprKind::Binary(ref cmp, ref left, ref right) = e.node {
             match cmp.node {
-                BiMul | BiBitAnd => {
+                BinOpKind::Mul | BinOpKind::BitAnd => {
                     check(cx, left, e.span);
                     check(cx, right, e.span);
                 },
-                BiDiv => check(cx, left, e.span),
+                BinOpKind::Div => check(cx, left, e.span),
                 _ => (),
             }
         }