]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/float_cmp.stderr
New upstream version 1.28.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / float_cmp.stderr
1 error: strict comparison of f32 or f64
2 --> $DIR/float_cmp.rs:49:5
3 |
4 49 | ONE as f64 != 2.0;
5 | ^^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(ONE as f64 - 2.0).abs() < error`
6 |
7 = note: `-D float-cmp` implied by `-D warnings`
8 note: std::f32::EPSILON and std::f64::EPSILON are available.
9 --> $DIR/float_cmp.rs:49:5
10 |
11 49 | ONE as f64 != 2.0;
12 | ^^^^^^^^^^^^^^^^^
13
14 error: strict comparison of f32 or f64
15 --> $DIR/float_cmp.rs:54:5
16 |
17 54 | 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:54:5
22 |
23 54 | x == 1.0;
24 | ^^^^^^^^
25
26 error: strict comparison of f32 or f64
27 --> $DIR/float_cmp.rs:57:5
28 |
29 57 | 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:57:5
34 |
35 57 | twice(x) != twice(ONE as f64);
36 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37
38 error: aborting due to 3 previous errors
39