-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have
Description
I have some code like this in serde_yaml:
error: casting i64 to u64 may lose the sign of the value
--> src/number.rs:172:37
|
172 | if n <= i64::max_value() as u64 {
| ^^^^^^^^^^^^^^^^^^^^^^^
It would be nice to suppress cast_sign_loss in cases where Clippy can determine that the value is nonnegative, for example i64::MAX
and i64::max_value()
.
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have