Skip to content

Commit d78befe

Browse files
committed
Place radian lints under suboptimal_flops
1 parent fadc60f commit d78befe

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

clippy_lints/src/floating_point_arithmetic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ fn check_radians(cx: &LateContext<'_>, expr: &Expr<'_>) {
641641
{
642642
span_lint_and_sugg(
643643
cx,
644-
IMPRECISE_FLOPS,
644+
SUBOPTIMAL_FLOPS,
645645
expr.span,
646646
"conversion to degrees can be done more accurately",
647647
"consider using",
@@ -654,7 +654,7 @@ fn check_radians(cx: &LateContext<'_>, expr: &Expr<'_>) {
654654
{
655655
span_lint_and_sugg(
656656
cx,
657-
IMPRECISE_FLOPS,
657+
SUBOPTIMAL_FLOPS,
658658
expr.span,
659659
"conversion to radians can be done more accurately",
660660
"consider using",

tests/ui/floating_point_rad.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-rustfix
2-
#![warn(clippy::imprecise_flops)]
2+
#![warn(clippy::suboptimal_flops)]
33

44
fn main() {
55
let x = 3f32;

tests/ui/floating_point_rad.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-rustfix
2-
#![warn(clippy::imprecise_flops)]
2+
#![warn(clippy::suboptimal_flops)]
33

44
fn main() {
55
let x = 3f32;

tests/ui/floating_point_rad.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: conversion to degrees can be done more accurately
44
LL | let _ = x * 180f32 / std::f32::consts::PI;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `x.to_degrees()`
66
|
7-
= note: `-D clippy::imprecise-flops` implied by `-D warnings`
7+
= note: `-D clippy::suboptimal-flops` implied by `-D warnings`
88

99
error: conversion to radians can be done more accurately
1010
--> $DIR/floating_point_rad.rs:7:13

0 commit comments

Comments
 (0)