diff options
| author | klensy <klensy@users.noreply.github.com> | 2024-12-12 16:42:17 +0300 |
|---|---|---|
| committer | klensy <klensy@users.noreply.github.com> | 2024-12-12 16:42:17 +0300 |
| commit | db35e308c2b92ed13369ea53ad54625abcf4422c (patch) | |
| tree | 56a30df7cf24a4c9e9f977e2ed64c9c64239f0d9 | |
| parent | f2aed50873e8e908119044c283c33cf6ef0b66e0 (diff) | |
| download | rust-db35e308c2b92ed13369ea53ad54625abcf4422c.tar.gz rust-db35e308c2b92ed13369ea53ad54625abcf4422c.zip | |
fix typo
| -rw-r--r-- | clippy_lints/src/operators/numeric_arithmetic.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/operators/numeric_arithmetic.rs b/clippy_lints/src/operators/numeric_arithmetic.rs index d369978b8be..2083f2bf628 100644 --- a/clippy_lints/src/operators/numeric_arithmetic.rs +++ b/clippy_lints/src/operators/numeric_arithmetic.rs @@ -43,8 +43,8 @@ impl Context { _ => (), } - let (_, r_ty) = (cx.typeck_results().expr_ty(l), cx.typeck_results().expr_ty(r)); - if r_ty.peel_refs().is_floating_point() && r_ty.peel_refs().is_floating_point() { + let (l_ty, r_ty) = (cx.typeck_results().expr_ty(l), cx.typeck_results().expr_ty(r)); + if l_ty.peel_refs().is_floating_point() && r_ty.peel_refs().is_floating_point() { span_lint(cx, FLOAT_ARITHMETIC, expr.span, "floating-point arithmetic detected"); self.expr_id = Some(expr.hir_id); } |
