]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/modulo_arithmetic.rs
ast/hir: Rename field-related structures
[rust.git] / clippy_lints / src / modulo_arithmetic.rs
index 5d4436bd206d2b48d61edcbbee93b20cd02b26bf..da3ae1d652f6c515862ebb2c74016b4c7e69c4f0 100644 (file)
@@ -8,7 +8,7 @@
 use std::fmt::Display;
 
 declare_clippy_lint! {
-    /// **What it does:** Checks for modulo arithemtic.
+    /// **What it does:** Checks for modulo arithmetic.
     ///
     /// **Why is this bad?** The results of modulo (%) operation might differ
     /// depending on the language, when negative numbers are involved.
@@ -38,7 +38,7 @@ struct OperandInfo {
 
 fn analyze_operand(operand: &Expr<'_>, cx: &LateContext<'_>, expr: &Expr<'_>) -> Option<OperandInfo> {
     match constant(cx, cx.typeck_results(), operand) {
-        Some((Constant::Int(v), _)) => match cx.typeck_results().expr_ty(expr).kind {
+        Some((Constant::Int(v), _)) => match *cx.typeck_results().expr_ty(expr).kind() {
             ty::Int(ity) => {
                 let value = sext(cx.tcx, v, ity);
                 return Some(OperandInfo {