about summary refs log tree commit diff
path: root/clippy_lints/src/arithmetic.rs
diff options
context:
space:
mode:
authorValentin Lazureanu <valentin@lazureanu.com>2020-07-17 08:47:04 +0000
committerValentin Lazureanu <valentin@lazureanu.com>2020-07-17 08:47:04 +0000
commit5a20489c5ca0951827cbb1b4d72ddfdfd393713a (patch)
tree263af6d529b7113ed43b0ce3a4393ca65aa10bd5 /clippy_lints/src/arithmetic.rs
parent62db617e401487f7b4b5d2d19591b16c7339d131 (diff)
Rename TypeckTables to TypeckResults.
Diffstat (limited to 'clippy_lints/src/arithmetic.rs')
-rw-r--r--clippy_lints/src/arithmetic.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/arithmetic.rs b/clippy_lints/src/arithmetic.rs
index da60856fac9..e84481f9b53 100644
--- a/clippy_lints/src/arithmetic.rs
+++ b/clippy_lints/src/arithmetic.rs
@@ -86,7 +86,7 @@ impl<'tcx> LateLintPass<'tcx> for Arithmetic {
                     _ => (),
                 }
 
-                let (l_ty, r_ty) = (cx.tables().expr_ty(l), cx.tables().expr_ty(r));
+                let (l_ty, r_ty) = (cx.typeck_results().expr_ty(l), cx.typeck_results().expr_ty(r));
                 if l_ty.peel_refs().is_integral() && r_ty.peel_refs().is_integral() {
                     span_lint(cx, INTEGER_ARITHMETIC, expr.span, "integer arithmetic detected");
                     self.expr_span = Some(expr.span);
@@ -96,8 +96,8 @@ impl<'tcx> LateLintPass<'tcx> for Arithmetic {
                 }
             },
             hir::ExprKind::Unary(hir::UnOp::UnNeg, arg) => {
-                let ty = cx.tables().expr_ty(arg);
-                if constant_simple(cx, cx.tables(), expr).is_none() {
+                let ty = cx.typeck_results().expr_ty(arg);
+                if constant_simple(cx, cx.typeck_results(), expr).is_none() {
                     if ty.is_integral() {
                         span_lint(cx, INTEGER_ARITHMETIC, expr.span, "integer arithmetic detected");
                         self.expr_span = Some(expr.span);