]> git.lizzy.rs Git - rust.git/blob - tests/ui/float_cmp_const.stderr
Merge branch 'master' into lint-5734
[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 margin of error: `(1f32 - ONE).abs() < error_margin`
6    |
7    = note: `-D clippy::float-cmp-const` implied by `-D warnings`
8    = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
9
10 error: strict comparison of `f32` or `f64` constant
11   --> $DIR/float_cmp_const.rs:21:5
12    |
13 LL |     TWO == ONE;
14    |     ^^^^^^^^^^ help: consider comparing them within some margin of error: `(TWO - ONE).abs() < error_margin`
15    |
16    = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
17
18 error: strict comparison of `f32` or `f64` constant
19   --> $DIR/float_cmp_const.rs:22:5
20    |
21 LL |     TWO != ONE;
22    |     ^^^^^^^^^^ help: consider comparing them within some margin of error: `(TWO - ONE).abs() > error_margin`
23    |
24    = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
25
26 error: strict comparison of `f32` or `f64` constant
27   --> $DIR/float_cmp_const.rs:23:5
28    |
29 LL |     ONE + ONE == TWO;
30    |     ^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(ONE + ONE - TWO).abs() < error_margin`
31    |
32    = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
33
34 error: strict comparison of `f32` or `f64` constant
35   --> $DIR/float_cmp_const.rs:25:5
36    |
37 LL |     x as f32 == ONE;
38    |     ^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(x as f32 - ONE).abs() < error_margin`
39    |
40    = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
41
42 error: strict comparison of `f32` or `f64` constant
43   --> $DIR/float_cmp_const.rs:28:5
44    |
45 LL |     v == ONE;
46    |     ^^^^^^^^ help: consider comparing them within some margin of error: `(v - ONE).abs() < error_margin`
47    |
48    = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
49
50 error: strict comparison of `f32` or `f64` constant
51   --> $DIR/float_cmp_const.rs:29:5
52    |
53 LL |     v != ONE;
54    |     ^^^^^^^^ help: consider comparing them within some margin of error: `(v - ONE).abs() > error_margin`
55    |
56    = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
57
58 error: strict comparison of `f32` or `f64` constant arrays
59   --> $DIR/float_cmp_const.rs:61:5
60    |
61 LL |     NON_ZERO_ARRAY == NON_ZERO_ARRAY2;
62    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
63    |
64    = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
65
66 error: aborting due to 8 previous errors
67