]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/float_equality_without_abs.stderr
Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup
[rust.git] / src / tools / clippy / tests / ui / float_equality_without_abs.stderr
1 error: float equality check without `.abs()`
2   --> $DIR/float_equality_without_abs.rs:4:5
3    |
4 LL |     (a - b) < f32::EPSILON
5    |     -------^^^^^^^^^^^^^^^
6    |     |
7    |     help: add `.abs()`: `(a - b).abs()`
8    |
9    = note: `-D clippy::float-equality-without-abs` implied by `-D warnings`
10
11 error: float equality check without `.abs()`
12   --> $DIR/float_equality_without_abs.rs:13:13
13    |
14 LL |     let _ = (a - b) < f32::EPSILON;
15    |             -------^^^^^^^^^^^^^^^
16    |             |
17    |             help: add `.abs()`: `(a - b).abs()`
18
19 error: float equality check without `.abs()`
20   --> $DIR/float_equality_without_abs.rs:14:13
21    |
22 LL |     let _ = a - b < f32::EPSILON;
23    |             -----^^^^^^^^^^^^^^^
24    |             |
25    |             help: add `.abs()`: `(a - b).abs()`
26
27 error: float equality check without `.abs()`
28   --> $DIR/float_equality_without_abs.rs:15:13
29    |
30 LL |     let _ = a - b.abs() < f32::EPSILON;
31    |             -----------^^^^^^^^^^^^^^^
32    |             |
33    |             help: add `.abs()`: `(a - b.abs()).abs()`
34
35 error: float equality check without `.abs()`
36   --> $DIR/float_equality_without_abs.rs:16:13
37    |
38 LL |     let _ = (a as f64 - b as f64) < f64::EPSILON;
39    |             ---------------------^^^^^^^^^^^^^^^
40    |             |
41    |             help: add `.abs()`: `(a as f64 - b as f64).abs()`
42
43 error: float equality check without `.abs()`
44   --> $DIR/float_equality_without_abs.rs:17:13
45    |
46 LL |     let _ = 1.0 - 2.0 < f32::EPSILON;
47    |             ---------^^^^^^^^^^^^^^^
48    |             |
49    |             help: add `.abs()`: `(1.0 - 2.0).abs()`
50
51 error: float equality check without `.abs()`
52   --> $DIR/float_equality_without_abs.rs:19:13
53    |
54 LL |     let _ = f32::EPSILON > (a - b);
55    |             ^^^^^^^^^^^^^^^-------
56    |                            |
57    |                            help: add `.abs()`: `(a - b).abs()`
58
59 error: float equality check without `.abs()`
60   --> $DIR/float_equality_without_abs.rs:20:13
61    |
62 LL |     let _ = f32::EPSILON > a - b;
63    |             ^^^^^^^^^^^^^^^-----
64    |                            |
65    |                            help: add `.abs()`: `(a - b).abs()`
66
67 error: float equality check without `.abs()`
68   --> $DIR/float_equality_without_abs.rs:21:13
69    |
70 LL |     let _ = f32::EPSILON > a - b.abs();
71    |             ^^^^^^^^^^^^^^^-----------
72    |                            |
73    |                            help: add `.abs()`: `(a - b.abs()).abs()`
74
75 error: float equality check without `.abs()`
76   --> $DIR/float_equality_without_abs.rs:22:13
77    |
78 LL |     let _ = f64::EPSILON > (a as f64 - b as f64);
79    |             ^^^^^^^^^^^^^^^---------------------
80    |                            |
81    |                            help: add `.abs()`: `(a as f64 - b as f64).abs()`
82
83 error: float equality check without `.abs()`
84   --> $DIR/float_equality_without_abs.rs:23:13
85    |
86 LL |     let _ = f32::EPSILON > 1.0 - 2.0;
87    |             ^^^^^^^^^^^^^^^---------
88    |                            |
89    |                            help: add `.abs()`: `(1.0 - 2.0).abs()`
90
91 error: aborting due to 11 previous errors
92