]> git.lizzy.rs Git - rust.git/blob - tests/ui/float_cmp.stderr
Downgrade many_single_char_names to pedantic
[rust.git] / tests / ui / float_cmp.stderr
1 error: strict comparison of `f32` or `f64`
2   --> $DIR/float_cmp.rs:57:5
3    |
4 LL |     ONE as f64 != 2.0;
5    |     ^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(ONE as f64 - 2.0).abs() > error_margin`
6    |
7    = note: `-D clippy::float-cmp` 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`
11   --> $DIR/float_cmp.rs:62:5
12    |
13 LL |     x == 1.0;
14    |     ^^^^^^^^ help: consider comparing them within some margin of error: `(x - 1.0).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`
19   --> $DIR/float_cmp.rs:65:5
20    |
21 LL |     twice(x) != twice(ONE as f64);
22    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(twice(x) - twice(ONE as f64)).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`
27   --> $DIR/float_cmp.rs:85:5
28    |
29 LL |     NON_ZERO_ARRAY[i] == NON_ZERO_ARRAY[j];
30    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(NON_ZERO_ARRAY[i] - NON_ZERO_ARRAY[j]).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` arrays
35   --> $DIR/float_cmp.rs:90:5
36    |
37 LL |     a1 == a2;
38    |     ^^^^^^^^
39    |
40    = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
41
42 error: strict comparison of `f32` or `f64`
43   --> $DIR/float_cmp.rs:91:5
44    |
45 LL |     a1[0] == a2[0];
46    |     ^^^^^^^^^^^^^^ help: consider comparing them within some margin of error: `(a1[0] - a2[0]).abs() < error_margin`
47    |
48    = note: `f32::EPSILON` and `f64::EPSILON` are available for the `error_margin`
49
50 error: aborting due to 6 previous errors
51