Alex Macleod
4622203c9b
Move configuration to new clippy_config
crate
2023-10-23 20:05:10 +00:00
Chen Chen
3cad623716
更新 cast_lossless.rs
...
Co-authored-by: Timo <30553356+y21@users.noreply.github.com>
2023-09-17 02:42:12 +08:00
mojave2
af2a8478ba
fix cast_lossless with macro call
2023-09-16 23:17:47 +08:00
Alex Macleod
637139d2ff
Add clippy_utils::msrv::Msrv
to keep track of the current MSRV
2022-11-21 18:16:40 +00:00
Yuri Astrakhan
e67b2bf732
Apply uninlined_format-args to clippy_lints
...
This change is needed for the uninlined_format-args lint to be merged.
See https://github.com/rust-lang/rust-clippy/pull/9233
2022-09-23 13:42:59 -04:00
Samuel E. Moelius III
bdfea1c095
Pass msrvs by copy
2022-05-08 07:13:14 -04:00
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
5225225
d4c8cb63a4
Change cast_lossless message for bools only
2021-11-12 17:01:35 +00:00
5225225
6e84f00045
Check MSRV for bool to int from impl
2021-11-09 17:35:35 +00:00
5225225
33822012ec
Lint for bool to integer casts in cast_lossless
2021-11-09 17:30:15 +00:00
Cameron Steffen
0743e841f0
Don't re-export clippy_utils::*
2021-03-17 09:13:52 -05:00
Cameron Steffen
1c3a3e7dc6
Don't re-export clippy_utils::diagnostics::*
2021-03-15 20:06:01 -05:00
Cameron Steffen
6fc52a63d1
Move some utils to clippy_utils::source module
2021-03-15 15:34:15 -05:00
Cameron Steffen
eb7f8d6089
Move some utils to ty_utils
2021-03-15 13:44:09 -05:00
Yoshitomo Nakanishi
b12d7515b1
Move cast_lossless to its own module
2021-03-09 12:39:59 +09:00