mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
Place radian lints under suboptimal_flops
This commit is contained in:
parent
f5596826fa
commit
db7bc6b3bd
4 changed files with 5 additions and 5 deletions
|
@ -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",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// run-rustfix
|
||||
#![warn(clippy::imprecise_flops)]
|
||||
#![warn(clippy::suboptimal_flops)]
|
||||
|
||||
fn main() {
|
||||
let x = 3f32;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// run-rustfix
|
||||
#![warn(clippy::imprecise_flops)]
|
||||
#![warn(clippy::suboptimal_flops)]
|
||||
|
||||
fn main() {
|
||||
let x = 3f32;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue