1 error: float equality check without `.abs()`
2 --> $DIR/float_equality_without_abs.rs:4:5
4 LL | (a - b) < f32::EPSILON
5 | -------^^^^^^^^^^^^^^^
7 | help: add `.abs()`: `(a - b).abs()`
9 = note: `-D clippy::float-equality-without-abs` implied by `-D warnings`
11 error: float equality check without `.abs()`
12 --> $DIR/float_equality_without_abs.rs:13:13
14 LL | let _ = (a - b) < f32::EPSILON;
15 | -------^^^^^^^^^^^^^^^
17 | help: add `.abs()`: `(a - b).abs()`
19 error: float equality check without `.abs()`
20 --> $DIR/float_equality_without_abs.rs:14:13
22 LL | let _ = a - b < f32::EPSILON;
23 | -----^^^^^^^^^^^^^^^
25 | help: add `.abs()`: `(a - b).abs()`
27 error: float equality check without `.abs()`
28 --> $DIR/float_equality_without_abs.rs:15:13
30 LL | let _ = a - b.abs() < f32::EPSILON;
31 | -----------^^^^^^^^^^^^^^^
33 | help: add `.abs()`: `(a - b.abs()).abs()`
35 error: float equality check without `.abs()`
36 --> $DIR/float_equality_without_abs.rs:16:13
38 LL | let _ = (a as f64 - b as f64) < f64::EPSILON;
39 | ---------------------^^^^^^^^^^^^^^^
41 | help: add `.abs()`: `(a as f64 - b as f64).abs()`
43 error: float equality check without `.abs()`
44 --> $DIR/float_equality_without_abs.rs:17:13
46 LL | let _ = 1.0 - 2.0 < f32::EPSILON;
47 | ---------^^^^^^^^^^^^^^^
49 | help: add `.abs()`: `(1.0 - 2.0).abs()`
51 error: float equality check without `.abs()`
52 --> $DIR/float_equality_without_abs.rs:19:13
54 LL | let _ = f32::EPSILON > (a - b);
55 | ^^^^^^^^^^^^^^^-------
57 | help: add `.abs()`: `(a - b).abs()`
59 error: float equality check without `.abs()`
60 --> $DIR/float_equality_without_abs.rs:20:13
62 LL | let _ = f32::EPSILON > a - b;
63 | ^^^^^^^^^^^^^^^-----
65 | help: add `.abs()`: `(a - b).abs()`
67 error: float equality check without `.abs()`
68 --> $DIR/float_equality_without_abs.rs:21:13
70 LL | let _ = f32::EPSILON > a - b.abs();
71 | ^^^^^^^^^^^^^^^-----------
73 | help: add `.abs()`: `(a - b.abs()).abs()`
75 error: float equality check without `.abs()`
76 --> $DIR/float_equality_without_abs.rs:22:13
78 LL | let _ = f64::EPSILON > (a as f64 - b as f64);
79 | ^^^^^^^^^^^^^^^---------------------
81 | help: add `.abs()`: `(a as f64 - b as f64).abs()`
83 error: float equality check without `.abs()`
84 --> $DIR/float_equality_without_abs.rs:23:13
86 LL | let _ = f32::EPSILON > 1.0 - 2.0;
87 | ^^^^^^^^^^^^^^^---------
89 | help: add `.abs()`: `(1.0 - 2.0).abs()`
91 error: aborting due to 11 previous errors