Dan Gohman 6ff77b96f1 Fix cast_lossless to avoid warning on usize to f64 conversion.
Previously, the `cast_lossless` lint would issue a warning on code that
converted a `usize` value to `f64`, on 32-bit targets.

`usize` to `f64` is a lossless cast on 32-bit targets, however there is
no corresponding `f64::from` that takes a `usize`, so `cast_lossless`'s
suggested replacement does not compile.

This PR disables the lint in the case of casting from `usize` or `isize`.

Fixes #3689.

changelog: [`cast_lossless`] no longer gives wrong suggestion on usize->f64
2022-05-02 13:52:13 -07:00
..
2022-04-15 14:18:09 -07:00
2022-04-19 10:48:12 +09:00
2022-04-19 10:48:12 +09:00
2022-04-19 10:48:12 +09:00
2022-04-21 10:03:01 +02:00
2022-04-21 10:03:01 +02:00
2022-04-21 10:03:01 +02:00
2022-04-25 05:20:08 -04:00
2022-04-13 22:48:36 -06:00
2022-04-13 22:48:36 -06:00
2022-04-14 13:16:46 +02:00
2022-04-13 13:48:27 +02:00
2022-04-13 13:48:27 +02:00
2022-04-24 09:15:26 -04:00
2022-04-24 09:15:26 -04:00
2022-04-24 09:15:26 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
fix
2022-04-23 22:45:26 +09:00
fix
2022-04-23 22:45:26 +09:00
fix
2022-04-23 22:45:26 +09:00