4 #![warn(float_cmp_const)]
5 #![allow(unused, no_effect, unnecessary_operation)]
10 fn eq_one(x: f32) -> bool {
11 if x.is_nan() { false } else { x == ONE } // no error, inside "eq" fn
26 // no errors, lower than or greater than comparisons
32 // no errors, zero and infinity values
35 ONE != ::std::f32::INFINITY;
36 ONE == ::std::f32::NEG_INFINITY;
38 // Note: float_cmp will warn as expected on cases where there are no float constants