2022-10-23 13:18:45 +00:00
|
|
|
error: casting a known NaN to usize
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/cast_nan_to_int.rs:7:13
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (0.0_f32 / -0.0) as usize;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: this always evaluates to 0
|
|
|
|
= note: `-D clippy::cast-nan-to-int` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::cast_nan_to_int)]`
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
error: casting a known NaN to usize
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/cast_nan_to_int.rs:10:13
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (f64::INFINITY * -0.0) as usize;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: this always evaluates to 0
|
|
|
|
|
|
|
|
error: casting a known NaN to usize
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/cast_nan_to_int.rs:13:13
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (0.0 * f32::INFINITY) as usize;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: this always evaluates to 0
|
|
|
|
|
|
|
|
error: casting a known NaN to usize
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/cast_nan_to_int.rs:17:13
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (f64::INFINITY + f64::NEG_INFINITY) as usize;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: this always evaluates to 0
|
|
|
|
|
|
|
|
error: casting a known NaN to usize
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/cast_nan_to_int.rs:20:13
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (f32::INFINITY - f32::INFINITY) as usize;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: this always evaluates to 0
|
|
|
|
|
|
|
|
error: casting a known NaN to usize
|
2024-06-18 17:34:49 +00:00
|
|
|
--> tests/ui/cast_nan_to_int.rs:23:13
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (f32::INFINITY / f32::NEG_INFINITY) as usize;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: this always evaluates to 0
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|