mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-03-01 22:07:15 +00:00
Includes TODO for constants equivalent to π/180
This commit is contained in:
parent
6be9491eac
commit
3065201eb3
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue