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 // has float_cmp warns (as expected), no float constants
39 // no errors, zero and infinity values
42 ONE != ::std::f32::INFINITY;
43 ONE == ::std::f32::NEG_INFINITY;