summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/manual_float_methods.stderr
blob: 680ab2efa094f89cf90654ca7aa353d63ddcfa5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
error: manually checking if a float is infinite
  --> $DIR/manual_float_methods.rs:23:8
   |
LL |     if x == f32::INFINITY || x == f32::NEG_INFINITY {}
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the dedicated method instead: `x.is_infinite()`
   |
   = note: `-D clippy::manual-is-infinite` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::manual_is_infinite)]`

error: manually checking if a float is finite
  --> $DIR/manual_float_methods.rs:24:8
   |
LL |     if x != f32::INFINITY && x != f32::NEG_INFINITY {}
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D clippy::manual-is-finite` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::manual_is_finite)]`
help: use the dedicated method instead
   |
LL |     if x.is_finite() {}
   |        ~~~~~~~~~~~~~
help: this will alter how it handles NaN; if that is a problem, use instead
   |
LL |     if x.is_finite() || x.is_nan() {}
   |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: or, for conciseness
   |
LL |     if !x.is_infinite() {}
   |        ~~~~~~~~~~~~~~~~

error: manually checking if a float is infinite
  --> $DIR/manual_float_methods.rs:25:8
   |
LL |     if x == INFINITE || x == NEG_INFINITE {}
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the dedicated method instead: `x.is_infinite()`

error: manually checking if a float is finite
  --> $DIR/manual_float_methods.rs:26:8
   |
LL |     if x != INFINITE && x != NEG_INFINITE {}
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: use the dedicated method instead
   |
LL |     if x.is_finite() {}
   |        ~~~~~~~~~~~~~
help: this will alter how it handles NaN; if that is a problem, use instead
   |
LL |     if x.is_finite() || x.is_nan() {}
   |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: or, for conciseness
   |
LL |     if !x.is_infinite() {}
   |        ~~~~~~~~~~~~~~~~

error: manually checking if a float is infinite
  --> $DIR/manual_float_methods.rs:28:8
   |
LL |     if x == f64::INFINITY || x == f64::NEG_INFINITY {}
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the dedicated method instead: `x.is_infinite()`

error: manually checking if a float is finite
  --> $DIR/manual_float_methods.rs:29:8
   |
LL |     if x != f64::INFINITY && x != f64::NEG_INFINITY {}
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: use the dedicated method instead
   |
LL |     if x.is_finite() {}
   |        ~~~~~~~~~~~~~
help: this will alter how it handles NaN; if that is a problem, use instead
   |
LL |     if x.is_finite() || x.is_nan() {}
   |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: or, for conciseness
   |
LL |     if !x.is_infinite() {}
   |        ~~~~~~~~~~~~~~~~

error: aborting due to 6 previous errors