]> git.lizzy.rs Git - rust.git/blob - tests/ui/float_cmp.stderr
Respond to review comments
[rust.git] / tests / ui / float_cmp.stderr
1 error: this type has already been used as a bound predicate
2   --> $DIR/float_cmp.rs:12:5
3    |
4 LL |     T: Copy,
5    |     ^^^^^^^
6    |
7    = note: `-D clippy::type-repetition-in-bounds` implied by `-D warnings`
8    = help: consider combining the bounds: `T: Add<T, Output = T>, Copy`
9
10 error: strict comparison of f32 or f64
11   --> $DIR/float_cmp.rs:60:5
12    |
13 LL |     ONE as f64 != 2.0;
14    |     ^^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(ONE as f64 - 2.0).abs() > error`
15    |
16    = note: `-D clippy::float-cmp` implied by `-D warnings`
17 note: std::f32::EPSILON and std::f64::EPSILON are available.
18   --> $DIR/float_cmp.rs:60:5
19    |
20 LL |     ONE as f64 != 2.0;
21    |     ^^^^^^^^^^^^^^^^^
22
23 error: strict comparison of f32 or f64
24   --> $DIR/float_cmp.rs:65:5
25    |
26 LL |     x == 1.0;
27    |     ^^^^^^^^ help: consider comparing them within some error: `(x - 1.0).abs() < error`
28    |
29 note: std::f32::EPSILON and std::f64::EPSILON are available.
30   --> $DIR/float_cmp.rs:65:5
31    |
32 LL |     x == 1.0;
33    |     ^^^^^^^^
34
35 error: strict comparison of f32 or f64
36   --> $DIR/float_cmp.rs:68:5
37    |
38 LL |     twice(x) != twice(ONE as f64);
39    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(twice(x) - twice(ONE as f64)).abs() > error`
40    |
41 note: std::f32::EPSILON and std::f64::EPSILON are available.
42   --> $DIR/float_cmp.rs:68:5
43    |
44 LL |     twice(x) != twice(ONE as f64);
45    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46
47 error: aborting due to 4 previous errors
48