2023-06-30 16:31:08 +00:00
|
|
|
error: manually checking if a float is infinite
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/manual_float_methods.rs:23:8
|
2023-06-30 16:31:08 +00:00
|
|
|
|
|
|
|
|
LL | if x == f32::INFINITY || x == f32::NEG_INFINITY {}
|
2023-07-02 16:43:05 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the dedicated method instead: `x.is_infinite()`
|
2023-06-30 16:31:08 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-is-infinite` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: manually checking if a float is finite
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/manual_float_methods.rs:24:8
|
2023-06-30 16:31:08 +00:00
|
|
|
|
|
|
|
|
LL | if x != f32::INFINITY && x != f32::NEG_INFINITY {}
|
2023-07-02 16:43:05 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2023-06-30 16:31:08 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-is-finite` implied by `-D warnings`
|
2023-07-02 16:43:05 +00:00
|
|
|
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() {}
|
|
|
|
| ~~~~~~~~~~~~~~~~
|
2023-06-30 16:31:08 +00:00
|
|
|
|
|
|
|
error: manually checking if a float is infinite
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/manual_float_methods.rs:25:8
|
2023-06-30 16:31:08 +00:00
|
|
|
|
|
|
|
|
LL | if x == INFINITE || x == NEG_INFINITE {}
|
2023-07-02 16:43:05 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the dedicated method instead: `x.is_infinite()`
|
2023-06-30 16:31:08 +00:00
|
|
|
|
|
|
|
error: manually checking if a float is finite
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/manual_float_methods.rs:26:8
|
2023-06-30 16:31:08 +00:00
|
|
|
|
|
|
|
|
LL | if x != INFINITE && x != NEG_INFINITE {}
|
2023-07-02 16:43:05 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
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() {}
|
|
|
|
| ~~~~~~~~~~~~~~~~
|
2023-06-30 16:31:08 +00:00
|
|
|
|
|
|
|
error: manually checking if a float is infinite
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/manual_float_methods.rs:28:8
|
2023-06-30 16:31:08 +00:00
|
|
|
|
|
|
|
|
LL | if x == f64::INFINITY || x == f64::NEG_INFINITY {}
|
2023-07-02 16:43:05 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the dedicated method instead: `x.is_infinite()`
|
2023-06-30 16:31:08 +00:00
|
|
|
|
|
|
|
error: manually checking if a float is finite
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/manual_float_methods.rs:29:8
|
2023-06-30 16:31:08 +00:00
|
|
|
|
|
|
|
|
LL | if x != f64::INFINITY && x != f64::NEG_INFINITY {}
|
2023-07-02 16:43:05 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
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() {}
|
|
|
|
| ~~~~~~~~~~~~~~~~
|
2023-06-30 16:31:08 +00:00
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|