Incorrect suggesetion in unnecessary_cast
lint
#8331
Labels
C-bug
Category: Clippy is not doing the correct thing
unnecessary_cast
lint
#8331
Summary
Clippy suggests changing
-1_i32 as i32
to1_i32
, which produces a different value. This happens with current stable and nightly Rust.Reproducer
I tried this code:
I expected to see clippy suggest
-1_i32
.Instead, this happened:
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: