rust-clippy/clippy_lints
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
..
src Fix cast_lossless to avoid warning on usize to f64 conversion. 2022-05-02 13:52:13 -07:00
Cargo.toml Bump Clippy Version -> 0.1.62 2022-04-07 16:24:33 +01:00
README.md clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy. 2020-03-10 01:05:54 +01:00

This crate contains Clippy lints. For the main crate, check GitHub.