|
1 | 1 | error: strict comparison of `f32` or `f64` |
2 | | - --> $DIR/float_cmp.rs:59:5 |
| 2 | + --> $DIR/float_cmp.rs:65:5 |
3 | 3 | | |
4 | 4 | LL | ONE as f64 != 2.0; |
5 | 5 | | ^^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(ONE as f64 - 2.0).abs() > error` |
6 | 6 | | |
7 | 7 | = note: `-D clippy::float-cmp` implied by `-D warnings` |
8 | 8 | note: `f32::EPSILON` and `f64::EPSILON` are available. |
9 | | - --> $DIR/float_cmp.rs:59:5 |
| 9 | + --> $DIR/float_cmp.rs:65:5 |
10 | 10 | | |
11 | 11 | LL | ONE as f64 != 2.0; |
12 | 12 | | ^^^^^^^^^^^^^^^^^ |
13 | 13 |
|
14 | 14 | error: strict comparison of `f32` or `f64` |
15 | | - --> $DIR/float_cmp.rs:64:5 |
| 15 | + --> $DIR/float_cmp.rs:70:5 |
16 | 16 | | |
17 | 17 | LL | x == 1.0; |
18 | 18 | | ^^^^^^^^ help: consider comparing them within some error: `(x - 1.0).abs() < error` |
19 | 19 | | |
20 | 20 | note: `f32::EPSILON` and `f64::EPSILON` are available. |
21 | | - --> $DIR/float_cmp.rs:64:5 |
| 21 | + --> $DIR/float_cmp.rs:70:5 |
22 | 22 | | |
23 | 23 | LL | x == 1.0; |
24 | 24 | | ^^^^^^^^ |
25 | 25 |
|
26 | 26 | error: strict comparison of `f32` or `f64` |
27 | | - --> $DIR/float_cmp.rs:67:5 |
| 27 | + --> $DIR/float_cmp.rs:73:5 |
28 | 28 | | |
29 | 29 | LL | twice(x) != twice(ONE as f64); |
30 | 30 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(twice(x) - twice(ONE as f64)).abs() > error` |
31 | 31 | | |
32 | 32 | note: `f32::EPSILON` and `f64::EPSILON` are available. |
33 | | - --> $DIR/float_cmp.rs:67:5 |
| 33 | + --> $DIR/float_cmp.rs:73:5 |
34 | 34 | | |
35 | 35 | LL | twice(x) != twice(ONE as f64); |
36 | 36 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
37 | 37 |
|
38 | 38 | error: strict comparison of `f32` or `f64` |
39 | | - --> $DIR/float_cmp.rs:83:5 |
| 39 | + --> $DIR/float_cmp.rs:93:5 |
40 | 40 | | |
41 | | -LL | assert_eq!(a1[0], a2[0]); |
42 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 41 | +LL | NON_ZERO_ARRAY[i] == NON_ZERO_ARRAY[j]; |
| 42 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(NON_ZERO_ARRAY[i] - NON_ZERO_ARRAY[j]).abs() < error` |
43 | 43 | | |
44 | | -note: `std::f32::EPSILON` and `std::f64::EPSILON` are available. |
45 | | - --> $DIR/float_cmp.rs:83:5 |
| 44 | +note: `f32::EPSILON` and `f64::EPSILON` are available. |
| 45 | + --> $DIR/float_cmp.rs:93:5 |
| 46 | + | |
| 47 | +LL | NON_ZERO_ARRAY[i] == NON_ZERO_ARRAY[j]; |
| 48 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 49 | + |
| 50 | +error: strict comparison of `f32` or `f64` |
| 51 | + --> $DIR/float_cmp.rs:98:5 |
| 52 | + | |
| 53 | +LL | a1 == a2; |
| 54 | + | ^^^^^^^^ |
| 55 | + | |
| 56 | +note: `f32::EPSILON` and `f64::EPSILON` are available. |
| 57 | + --> $DIR/float_cmp.rs:98:5 |
46 | 58 | | |
47 | | -LL | assert_eq!(a1[0], a2[0]); |
48 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
49 | | - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) |
| 59 | +LL | a1 == a2; |
| 60 | + | ^^^^^^^^ |
50 | 61 |
|
51 | 62 | error: strict comparison of `f32` or `f64` |
52 | | - --> $DIR/float_cmp.rs:85:5 |
| 63 | + --> $DIR/float_cmp.rs:99:5 |
53 | 64 | | |
54 | | -LL | assert_eq!(&a1[0], &a2[0]); |
55 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 65 | +LL | a1[0] == a2[0]; |
| 66 | + | ^^^^^^^^^^^^^^ help: consider comparing them within some error: `(a1[0] - a2[0]).abs() < error` |
56 | 67 | | |
57 | | -note: `std::f32::EPSILON` and `std::f64::EPSILON` are available. |
58 | | - --> $DIR/float_cmp.rs:85:5 |
| 68 | +note: `f32::EPSILON` and `f64::EPSILON` are available. |
| 69 | + --> $DIR/float_cmp.rs:99:5 |
59 | 70 | | |
60 | | -LL | assert_eq!(&a1[0], &a2[0]); |
61 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
62 | | - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) |
| 71 | +LL | a1[0] == a2[0]; |
| 72 | + | ^^^^^^^^^^^^^^ |
63 | 73 |
|
64 | | -error: aborting due to 5 previous errors |
| 74 | +error: aborting due to 6 previous errors |
65 | 75 |
|
0 commit comments