1 #![feature(tool_lints)]
4 #![warn(clippy::float_cmp_const)]
5 #![allow(clippy::float_cmp)]
6 #![allow(unused, clippy::no_effect, clippy::unnecessary_operation)]
11 fn eq_one(x: f32) -> bool {
12 if x.is_nan() { false } else { x == ONE } // no error, inside "eq" fn
27 // no errors, lower than or greater than comparisons
33 // no errors, zero and infinity values
36 ONE != ::std::f32::INFINITY;
37 ONE == ::std::f32::NEG_INFINITY;
39 // no errors, but will warn clippy::float_cmp if '#![allow(float_cmp)]' above is removed