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-22 20:05:18 -04:00
2022-04-13 22:47:08 -06: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-14 21:34:33 -04:00
2022-05-02 13:52:13 -07:00
2022-04-23 13:07:13 -04:00
2022-04-23 13:07:13 -04:00
2022-04-21 13:45:40 -04:00
2022-04-21 13:45:40 -04:00
2022-04-21 13:45:40 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04: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-27 13:05:01 +08:00
2022-04-27 13:05:01 +08:00
2022-04-27 13:05:01 +08:00
2022-04-25 05:20:08 -04:00
2022-04-22 20:05:18 -04:00
2022-04-13 22:48:36 -06:00
2022-04-13 22:48:36 -06:00
2022-04-13 22:48:36 -06:00
2022-04-13 22:48:36 -06:00
2022-04-22 20:05:18 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:34:33 -04:00
2022-04-14 21:34:33 -04:00
2022-04-14 21:34:33 -04:00
2022-04-13 19:31:24 +02:00
2022-04-13 19:31:24 +02:00
2022-04-13 19:31:24 +02:00
2022-04-21 18:33:54 +01:00
2022-04-21 18:33:54 +01:00
2022-04-21 18:33:54 +01:00
2022-04-24 15:28:36 +02:00
2022-04-24 15:28:36 +02:00
2022-04-24 15:28:36 +02:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-26 13:16:54 +01:00
2022-04-26 13:16:54 +01:00
2022-04-26 13:16:54 +01:00
2022-04-26 13:16:54 +01:00
2022-04-26 13:16:54 +01:00
2022-04-18 14:33:13 +09:00
2022-04-18 14:33:13 +09:00
2022-04-18 14:33:13 +09:00
2022-04-14 12:41:47 +02:00
2022-04-14 13:16:46 +02:00
2022-04-14 12:41:47 +02:00
2022-04-22 20:05:18 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 13:16:46 +02:00
2022-04-14 21:34:33 -04:00
2022-04-14 21:34:33 -04:00
2022-04-14 21:34:33 -04:00
2022-04-13 13:48:27 +02:00
2022-04-13 13:48:27 +02:00
2022-04-22 18:09:14 -04:00
2022-04-22 18:09:14 -04: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
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-18 14:42:24 +08:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-12 22:59:25 +09:00
2022-04-12 22:59:25 +09:00
2022-04-12 22:59:25 +09:00
2022-04-23 12:23:18 +01:00
2022-04-23 12:23:18 +01:00
2022-04-23 12:23:18 +01:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-04-23 22:45:26 +09:00
2022-04-23 22:45:26 +09:00
2022-04-23 22:45:26 +09:00