]> git.lizzy.rs Git - rust.git/blob - tests/ui/cmp_nan.rs
Auto merge of #3646 - matthiaskrgr:travis, r=phansch
[rust.git] / tests / ui / cmp_nan.rs
1 #[warn(clippy::cmp_nan)]
2 #[allow(clippy::float_cmp, clippy::no_effect, clippy::unnecessary_operation)]
3 fn main() {
4     let x = 5f32;
5     x == std::f32::NAN;
6     x != std::f32::NAN;
7     x < std::f32::NAN;
8     x > std::f32::NAN;
9     x <= std::f32::NAN;
10     x >= std::f32::NAN;
11
12     let y = 0f64;
13     y == std::f64::NAN;
14     y != std::f64::NAN;
15     y < std::f64::NAN;
16     y > std::f64::NAN;
17     y <= std::f64::NAN;
18     y >= std::f64::NAN;
19 }