1 error: strict comparison of f32 or f64
2 --> $DIR/float_cmp.rs:43:5
7 note: lint level defined here
8 --> $DIR/float_cmp.rs:4:9
10 4 | #![deny(float_cmp)]
12 help: consider comparing them within some error
13 | (ONE - 1f32).abs() < error;
14 note: std::f32::EPSILON and std::f64::EPSILON are available.
15 --> $DIR/float_cmp.rs:43:5
20 error: strict comparison of f32 or f64
21 --> $DIR/float_cmp.rs:47:5
23 47 | ONE == 1.0 + 0.0;
26 help: consider comparing them within some error
27 | (ONE - (1.0 + 0.0)).abs() < error;
28 note: std::f32::EPSILON and std::f64::EPSILON are available.
29 --> $DIR/float_cmp.rs:47:5
31 47 | ONE == 1.0 + 0.0;
34 error: strict comparison of f32 or f64
35 --> $DIR/float_cmp.rs:52:5
37 52 | ONE + ONE == ZERO + ONE + ONE;
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40 help: consider comparing them within some error
41 | (ONE + ONE - (ZERO + ONE + ONE)).abs() < error;
42 note: std::f32::EPSILON and std::f64::EPSILON are available.
43 --> $DIR/float_cmp.rs:52:5
45 52 | ONE + ONE == ZERO + ONE + ONE;
46 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48 error: strict comparison of f32 or f64
49 --> $DIR/float_cmp.rs:57:5
54 help: consider comparing them within some error
55 | (ONE - 2.0).abs() < error;
56 note: std::f32::EPSILON and std::f64::EPSILON are available.
57 --> $DIR/float_cmp.rs:57:5
62 error: strict comparison of f32 or f64
63 --> $DIR/float_cmp.rs:62:5
65 62 | twice(ONE) != ONE;
68 help: consider comparing them within some error
69 | (twice(ONE) - ONE).abs() < error;
70 note: std::f32::EPSILON and std::f64::EPSILON are available.
71 --> $DIR/float_cmp.rs:62:5
73 62 | twice(ONE) != ONE;
76 error: strict comparison of f32 or f64
77 --> $DIR/float_cmp.rs:66:5
79 66 | ONE as f64 != 2.0;
82 help: consider comparing them within some error
83 | (ONE as f64 - 2.0).abs() < error;
84 note: std::f32::EPSILON and std::f64::EPSILON are available.
85 --> $DIR/float_cmp.rs:66:5
87 66 | ONE as f64 != 2.0;
90 error: strict comparison of f32 or f64
91 --> $DIR/float_cmp.rs:74:5
96 help: consider comparing them within some error
97 | (x - 1.0).abs() < error;
98 note: std::f32::EPSILON and std::f64::EPSILON are available.
99 --> $DIR/float_cmp.rs:74:5
104 error: strict comparison of f32 or f64
105 --> $DIR/float_cmp.rs:80:5
107 80 | twice(x) != twice(ONE as f64);
108 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
110 help: consider comparing them within some error
111 | (twice(x) - twice(ONE as f64)).abs() < error;
112 note: std::f32::EPSILON and std::f64::EPSILON are available.
113 --> $DIR/float_cmp.rs:80:5
115 80 | twice(x) != twice(ONE as f64);
116 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
118 error: aborting due to 8 previous errors