]> git.lizzy.rs Git - rust.git/blob - tests/ui/float_cmp.stderr
Update to `rustc 1.19.0-nightly (6a5fc9eec 2017-05-02)`
[rust.git] / tests / ui / float_cmp.stderr
1 error: strict comparison of f32 or f64
2   --> $DIR/float_cmp.rs:43:5
3    |
4 43 |     ONE == 1f32;
5    |     ^^^^^^^^^^^ help: consider comparing them within some error `(ONE - 1f32).abs() < error`
6    |
7 note: lint level defined here
8   --> $DIR/float_cmp.rs:4:9
9    |
10 4  | #![deny(float_cmp)]
11    |         ^^^^^^^^^
12 note: std::f32::EPSILON and std::f64::EPSILON are available.
13   --> $DIR/float_cmp.rs:43:5
14    |
15 43 |     ONE == 1f32;
16    |     ^^^^^^^^^^^
17
18 error: strict comparison of f32 or f64
19   --> $DIR/float_cmp.rs:47:5
20    |
21 47 |     ONE == 1.0 + 0.0;
22    |     ^^^^^^^^^^^^^^^^ help: consider comparing them within some error `(ONE - (1.0 + 0.0)).abs() < error`
23    |
24 note: std::f32::EPSILON and std::f64::EPSILON are available.
25   --> $DIR/float_cmp.rs:47:5
26    |
27 47 |     ONE == 1.0 + 0.0;
28    |     ^^^^^^^^^^^^^^^^
29
30 error: strict comparison of f32 or f64
31   --> $DIR/float_cmp.rs:52:5
32    |
33 52 |     ONE + ONE == ZERO + ONE + ONE;
34    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some error `(ONE + ONE - (ZERO + ONE + ONE)).abs() < error`
35    |
36 note: std::f32::EPSILON and std::f64::EPSILON are available.
37   --> $DIR/float_cmp.rs:52:5
38    |
39 52 |     ONE + ONE == ZERO + ONE + ONE;
40    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41
42 error: strict comparison of f32 or f64
43   --> $DIR/float_cmp.rs:57:5
44    |
45 57 |     ONE != 2.0;
46    |     ^^^^^^^^^^ help: consider comparing them within some error `(ONE - 2.0).abs() < error`
47    |
48 note: std::f32::EPSILON and std::f64::EPSILON are available.
49   --> $DIR/float_cmp.rs:57:5
50    |
51 57 |     ONE != 2.0;
52    |     ^^^^^^^^^^
53
54 error: strict comparison of f32 or f64
55   --> $DIR/float_cmp.rs:62:5
56    |
57 62 |     twice(ONE) != ONE;
58    |     ^^^^^^^^^^^^^^^^^ help: consider comparing them within some error `(twice(ONE) - ONE).abs() < error`
59    |
60 note: std::f32::EPSILON and std::f64::EPSILON are available.
61   --> $DIR/float_cmp.rs:62:5
62    |
63 62 |     twice(ONE) != ONE;
64    |     ^^^^^^^^^^^^^^^^^
65
66 error: strict comparison of f32 or f64
67   --> $DIR/float_cmp.rs:66:5
68    |
69 66 |     ONE as f64 != 2.0;
70    |     ^^^^^^^^^^^^^^^^^ help: consider comparing them within some error `(ONE as f64 - 2.0).abs() < error`
71    |
72 note: std::f32::EPSILON and std::f64::EPSILON are available.
73   --> $DIR/float_cmp.rs:66:5
74    |
75 66 |     ONE as f64 != 2.0;
76    |     ^^^^^^^^^^^^^^^^^
77
78 error: strict comparison of f32 or f64
79   --> $DIR/float_cmp.rs:74:5
80    |
81 74 |     x == 1.0;
82    |     ^^^^^^^^ help: consider comparing them within some error `(x - 1.0).abs() < error`
83    |
84 note: std::f32::EPSILON and std::f64::EPSILON are available.
85   --> $DIR/float_cmp.rs:74:5
86    |
87 74 |     x == 1.0;
88    |     ^^^^^^^^
89
90 error: strict comparison of f32 or f64
91   --> $DIR/float_cmp.rs:80:5
92    |
93 80 |     twice(x) != twice(ONE as f64);
94    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some error `(twice(x) - twice(ONE as f64)).abs() < error`
95    |
96 note: std::f32::EPSILON and std::f64::EPSILON are available.
97   --> $DIR/float_cmp.rs:80:5
98    |
99 80 |     twice(x) != twice(ONE as f64);
100    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
101
102 error: aborting due to 8 previous errors
103