[arithmetic_side_effects] Shifts by in-bounds literals trigger a false positive. #10252
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Uh oh!
There was an error while loading. Please reload this page.
Summary
Shifts cannot overflow if their scale is in-bounds. Stuff like
(a as i32) << 31
obviously will never fail, and so they shouldn't trigger that lint.Lint Name
arithmetic_side_effects
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen: No error
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: