about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThiago Arrais <thiago.arrais@gmail.com>2020-07-06 13:14:52 -0300
committerThiago Arrais <thiago.arrais@gmail.com>2020-07-06 13:45:43 -0300
commit3065201eb3a0c4976de7ef5b5b924afde1b18325 (patch)
treebe6fc3586af059f257127deb47143dcdafa44727
parent6be9491eace540d341f3b8dbf775a10e25f6431a (diff)
downloadrust-3065201eb3a0c4976de7ef5b5b924afde1b18325.tar.gz
rust-3065201eb3a0c4976de7ef5b5b924afde1b18325.zip
Includes TODO for constants equivalent to π/180
-rw-r--r--clippy_lints/src/floating_point_arithmetic.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/clippy_lints/src/floating_point_arithmetic.rs b/clippy_lints/src/floating_point_arithmetic.rs
index 11bd0ae23aa..3087d6a940a 100644
--- a/clippy_lints/src/floating_point_arithmetic.rs
+++ b/clippy_lints/src/floating_point_arithmetic.rs
@@ -665,6 +665,7 @@ fn check_radians(cx: &LateContext<'_>, expr: &Expr<'_>) {
         if let Some((rvalue, _)) = constant(cx, cx.tables(), div_rhs);
         if let Some((lvalue, _)) = constant(cx, cx.tables(), mul_rhs);
         then {
+            // TODO: also check for constant values near PI/180 or 180/PI
             if (F32(f32_consts::PI) == rvalue || F64(f64_consts::PI) == rvalue) &&
                (F32(180_f32) == lvalue || F64(180_f64) == lvalue)
             {