mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
38d4ac7cea
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
76 lines
2 KiB
Text
76 lines
2 KiB
Text
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
|
|
--> $DIR/cmp_nan.rs:5:5
|
|
|
|
|
LL | x == std::f32::NAN;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::cmp-nan` implied by `-D warnings`
|
|
|
|
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
|
|
--> $DIR/cmp_nan.rs:6:5
|
|
|
|
|
LL | x != std::f32::NAN;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
|
|
--> $DIR/cmp_nan.rs:7:5
|
|
|
|
|
LL | x < std::f32::NAN;
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
|
|
--> $DIR/cmp_nan.rs:8:5
|
|
|
|
|
LL | x > std::f32::NAN;
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
|
|
--> $DIR/cmp_nan.rs:9:5
|
|
|
|
|
LL | x <= std::f32::NAN;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
|
|
--> $DIR/cmp_nan.rs:10:5
|
|
|
|
|
LL | x >= std::f32::NAN;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
|
|
--> $DIR/cmp_nan.rs:13:5
|
|
|
|
|
LL | y == std::f64::NAN;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
|
|
--> $DIR/cmp_nan.rs:14:5
|
|
|
|
|
LL | y != std::f64::NAN;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
|
|
--> $DIR/cmp_nan.rs:15:5
|
|
|
|
|
LL | y < std::f64::NAN;
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
|
|
--> $DIR/cmp_nan.rs:16:5
|
|
|
|
|
LL | y > std::f64::NAN;
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
|
|
--> $DIR/cmp_nan.rs:17:5
|
|
|
|
|
LL | y <= std::f64::NAN;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: doomed comparison with NAN, use `std::{f32,f64}::is_nan()` instead
|
|
--> $DIR/cmp_nan.rs:18:5
|
|
|
|
|
LL | y >= std::f64::NAN;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 12 previous errors
|
|
|