]> git.lizzy.rs Git - rust.git/blob - tests/ui/float_cmp.stderr
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / float_cmp.stderr
1 error: strict comparison of f32 or f64
2   --> $DIR/float_cmp.rs:69:5
3    |
4 LL |     ONE as f64 != 2.0;
5    |     ^^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(ONE as f64 - 2.0).abs() < error`
6    |
7    = note: `-D clippy::float-cmp` implied by `-D warnings`
8 note: std::f32::EPSILON and std::f64::EPSILON are available.
9   --> $DIR/float_cmp.rs:69:5
10    |
11 LL |     ONE as f64 != 2.0;
12    |     ^^^^^^^^^^^^^^^^^
13
14 error: strict comparison of f32 or f64
15   --> $DIR/float_cmp.rs:74:5
16    |
17 LL |     x == 1.0;
18    |     ^^^^^^^^ help: consider comparing them within some error: `(x - 1.0).abs() < error`
19    |
20 note: std::f32::EPSILON and std::f64::EPSILON are available.
21   --> $DIR/float_cmp.rs:74:5
22    |
23 LL |     x == 1.0;
24    |     ^^^^^^^^
25
26 error: strict comparison of f32 or f64
27   --> $DIR/float_cmp.rs:77:5
28    |
29 LL |     twice(x) != twice(ONE as f64);
30    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(twice(x) - twice(ONE as f64)).abs() < error`
31    |
32 note: std::f32::EPSILON and std::f64::EPSILON are available.
33   --> $DIR/float_cmp.rs:77:5
34    |
35 LL |     twice(x) != twice(ONE as f64);
36    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37
38 error: aborting due to 3 previous errors
39