]> git.lizzy.rs Git - rust.git/commitdiff
Place radian lints under suboptimal_flops
authorThiago Arrais <thiago.arrais@gmail.com>
Mon, 15 Jun 2020 16:59:44 +0000 (13:59 -0300)
committerThiago Arrais <thiago.arrais@gmail.com>
Mon, 6 Jul 2020 16:45:43 +0000 (13:45 -0300)
clippy_lints/src/floating_point_arithmetic.rs
tests/ui/floating_point_rad.fixed
tests/ui/floating_point_rad.rs
tests/ui/floating_point_rad.stderr

index b1e258f4b160a093676822f9a98bc0beb799531c..beb0b234408bcf2755c368c0bf5396dee5b9fbc4 100644 (file)
@@ -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",
index 64461417a6a11d3a387f6e56bd5d57b9fe61e05e..92480c5db8be446f807d15087515ecab6482fdc3 100644 (file)
@@ -1,5 +1,5 @@
 // run-rustfix
-#![warn(clippy::imprecise_flops)]
+#![warn(clippy::suboptimal_flops)]
 
 fn main() {
     let x = 3f32;
index 9046f184b3e5203f29f4dd0932297880a53602b7..062e7c3fdc17afe8d7c1aa4d9a53aa00bff0ae3c 100644 (file)
@@ -1,5 +1,5 @@
 // run-rustfix
-#![warn(clippy::imprecise_flops)]
+#![warn(clippy::suboptimal_flops)]
 
 fn main() {
     let x = 3f32;
index 81e8182151377d9dcb6775b31ada6cd4694d1e39..a6ffdca64eefea7b563eec7a75c4002f87083be1 100644 (file)
@@ -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