]> git.lizzy.rs Git - rust.git/blob - tests/ui/float_cmp_const.stderr
Auto merge of #5437 - rabisg0:should-impl-trait, r=flip1995
[rust.git] / tests / ui / float_cmp_const.stderr
1 error: strict comparison of `f32` or `f64` constant
2   --> $DIR/float_cmp_const.rs:20:5
3    |
4 LL |     1f32 == ONE;
5    |     ^^^^^^^^^^^ help: consider comparing them within some error: `(1f32 - ONE).abs() < error`
6    |
7    = note: `-D clippy::float-cmp-const` implied by `-D warnings`
8 note: `f32::EPSILON` and `f64::EPSILON` are available.
9   --> $DIR/float_cmp_const.rs:20:5
10    |
11 LL |     1f32 == ONE;
12    |     ^^^^^^^^^^^
13
14 error: strict comparison of `f32` or `f64` constant
15   --> $DIR/float_cmp_const.rs:21:5
16    |
17 LL |     TWO == ONE;
18    |     ^^^^^^^^^^ help: consider comparing them within some error: `(TWO - ONE).abs() < error`
19    |
20 note: `f32::EPSILON` and `f64::EPSILON` are available.
21   --> $DIR/float_cmp_const.rs:21:5
22    |
23 LL |     TWO == ONE;
24    |     ^^^^^^^^^^
25
26 error: strict comparison of `f32` or `f64` constant
27   --> $DIR/float_cmp_const.rs:22:5
28    |
29 LL |     TWO != ONE;
30    |     ^^^^^^^^^^ help: consider comparing them within some error: `(TWO - ONE).abs() > error`
31    |
32 note: `f32::EPSILON` and `f64::EPSILON` are available.
33   --> $DIR/float_cmp_const.rs:22:5
34    |
35 LL |     TWO != ONE;
36    |     ^^^^^^^^^^
37
38 error: strict comparison of `f32` or `f64` constant
39   --> $DIR/float_cmp_const.rs:23:5
40    |
41 LL |     ONE + ONE == TWO;
42    |     ^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(ONE + ONE - TWO).abs() < error`
43    |
44 note: `f32::EPSILON` and `f64::EPSILON` are available.
45   --> $DIR/float_cmp_const.rs:23:5
46    |
47 LL |     ONE + ONE == TWO;
48    |     ^^^^^^^^^^^^^^^^
49
50 error: strict comparison of `f32` or `f64` constant
51   --> $DIR/float_cmp_const.rs:25:5
52    |
53 LL |     x as f32 == ONE;
54    |     ^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(x as f32 - ONE).abs() < error`
55    |
56 note: `f32::EPSILON` and `f64::EPSILON` are available.
57   --> $DIR/float_cmp_const.rs:25:5
58    |
59 LL |     x as f32 == ONE;
60    |     ^^^^^^^^^^^^^^^
61
62 error: strict comparison of `f32` or `f64` constant
63   --> $DIR/float_cmp_const.rs:28:5
64    |
65 LL |     v == ONE;
66    |     ^^^^^^^^ help: consider comparing them within some error: `(v - ONE).abs() < error`
67    |
68 note: `f32::EPSILON` and `f64::EPSILON` are available.
69   --> $DIR/float_cmp_const.rs:28:5
70    |
71 LL |     v == ONE;
72    |     ^^^^^^^^
73
74 error: strict comparison of `f32` or `f64` constant
75   --> $DIR/float_cmp_const.rs:29:5
76    |
77 LL |     v != ONE;
78    |     ^^^^^^^^ help: consider comparing them within some error: `(v - ONE).abs() > error`
79    |
80 note: `f32::EPSILON` and `f64::EPSILON` are available.
81   --> $DIR/float_cmp_const.rs:29:5
82    |
83 LL |     v != ONE;
84    |     ^^^^^^^^
85
86 error: aborting due to 7 previous errors
87