False positive for cast_sign_loss #4743
Labels
C-bug
Category: Clippy is not doing the correct thing
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
good-first-issue
These issues are a good way to get started with Clippy
cargo clippy -V
Example code
Playground
Problem
Clippy does warn, that the sign could be lost implicitly, even though it is done explicitly with
checked_abs
, which either returnsSome(positive i64)
orNone
.Expected behavior
Clippy should ignore this case.
The text was updated successfully, but these errors were encountered: