rust-clippy/clippy_lints/src/casts
bors 4f82dd83df Auto merge of #7948 - 5225225:castlosslessbool, r=llogiq
Lint for bool to integer casts in `cast_lossless`

The lint description says

> Checks for casts between *numerical* types that may be replaced by safe conversion functions.

Which is strictly speaking being violated here, but it seems within the spirit of the lint. I think it is still a useful lint to have, and having a different lint for just this feels excessive. Thoughts?

Fixes #7947

changelog: Lint for bool to integer casts in [`cast_lossless`]
2021-11-12 18:17:18 +00:00
..
cast_lossless.rs Change cast_lossless message for bools only 2021-11-12 17:01:35 +00:00
cast_possible_truncation.rs avoid linting possible_truncation on bit-reducing operations 2021-10-29 21:59:24 +02:00
cast_possible_wrap.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
cast_precision_loss.rs Implement equatable if let lint 2021-10-04 22:16:42 +03:30
cast_ptr_alignment.rs Merge remote-tracking branch 'upstream/master' into rustup 2021-09-08 10:51:27 +02:00
cast_ref_to_mut.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
cast_sign_loss.rs Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyup 2021-06-03 08:41:37 +02:00
char_lit_as_u8.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
fn_to_numeric_cast.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
fn_to_numeric_cast_any.rs Restriction lint for function pointer casts 2021-10-07 09:11:47 -05:00
fn_to_numeric_cast_with_truncation.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
mod.rs Auto merge of #7948 - 5225225:castlosslessbool, r=llogiq 2021-11-12 18:17:18 +00:00
ptr_as_ptr.rs Merge commit '7c7683c8efe447b251d6c5ca6cce51233060f6e8' into clippyup 2021-04-27 16:55:11 +02:00
unnecessary_cast.rs Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup 2021-03-25 19:29:11 +01:00
utils.rs Merge commit '6ed6f1e6a1a8f414ba7e6d9b8222e7e5a1686e42' into clippyup 2021-03-12 15:30:50 +01:00