about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThiago Arrais <thiago.arrais@gmail.com>2020-06-15 13:59:44 -0300
committerThiago Arrais <thiago.arrais@gmail.com>2020-07-06 13:45:43 -0300
commitdb7bc6b3bd0e58c8fbf7507713a4214299f39c36 (patch)
tree90b67c6082ec105abb1243b81b0c7ef90f9a4b25
parentf5596826fa59035e6c57d8968df0d61f69c2537b (diff)
downloadrust-db7bc6b3bd0e58c8fbf7507713a4214299f39c36.tar.gz
rust-db7bc6b3bd0e58c8fbf7507713a4214299f39c36.zip
Place radian lints under suboptimal_flops
-rw-r--r--clippy_lints/src/floating_point_arithmetic.rs4
-rw-r--r--tests/ui/floating_point_rad.fixed2
-rw-r--r--tests/ui/floating_point_rad.rs2
-rw-r--r--tests/ui/floating_point_rad.stderr2
4 files changed, 5 insertions, 5 deletions
diff --git a/clippy_lints/src/floating_point_arithmetic.rs b/clippy_lints/src/floating_point_arithmetic.rs
index b1e258f4b16..beb0b234408 100644
--- a/clippy_lints/src/floating_point_arithmetic.rs
+++ b/clippy_lints/src/floating_point_arithmetic.rs
@@ -651,7 +651,7 @@ fn check_radians(cx: &LateContext<'_>, expr: &Expr<'_>) {
             {
                 span_lint_and_sugg(
                     cx,
-                    IMPRECISE_FLOPS,
+                    SUBOPTIMAL_FLOPS,
                     expr.span,
                     "conversion to degrees can be done more accurately",
                     "consider using",
@@ -664,7 +664,7 @@ fn check_radians(cx: &LateContext<'_>, expr: &Expr<'_>) {
             {
                 span_lint_and_sugg(
                     cx,
-                    IMPRECISE_FLOPS,
+                    SUBOPTIMAL_FLOPS,
                     expr.span,
                     "conversion to radians can be done more accurately",
                     "consider using",
diff --git a/tests/ui/floating_point_rad.fixed b/tests/ui/floating_point_rad.fixed
index 64461417a6a..92480c5db8b 100644
--- a/tests/ui/floating_point_rad.fixed
+++ b/tests/ui/floating_point_rad.fixed
@@ -1,5 +1,5 @@
 // run-rustfix
-#![warn(clippy::imprecise_flops)]
+#![warn(clippy::suboptimal_flops)]
 
 fn main() {
     let x = 3f32;
diff --git a/tests/ui/floating_point_rad.rs b/tests/ui/floating_point_rad.rs
index 9046f184b3e..062e7c3fdc1 100644
--- a/tests/ui/floating_point_rad.rs
+++ b/tests/ui/floating_point_rad.rs
@@ -1,5 +1,5 @@
 // run-rustfix
-#![warn(clippy::imprecise_flops)]
+#![warn(clippy::suboptimal_flops)]
 
 fn main() {
     let x = 3f32;
diff --git a/tests/ui/floating_point_rad.stderr b/tests/ui/floating_point_rad.stderr
index 81e81821513..a6ffdca64ee 100644
--- a/tests/ui/floating_point_rad.stderr
+++ b/tests/ui/floating_point_rad.stderr
@@ -4,7 +4,7 @@ error: conversion to degrees can be done more accurately
 LL |     let _ = x * 180f32 / std::f32::consts::PI;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.to_degrees()`
    |
-   = note: `-D clippy::imprecise-flops` implied by `-D warnings`
+   = note: `-D clippy::suboptimal-flops` implied by `-D warnings`
 
 error: conversion to radians can be done more accurately
   --> $DIR/floating_point_rad.rs:7:13