-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
integer_arithmetic: check all/only overflowing ops
Make the `integer_arithmetic` lint detect all the operations that are defined as being capable of overflow in the Rust Reference. Changes: * Disallow bit shifting (`<<`, `>>`). They overflow if the RHS exceeds the bit width. * Allow unsigned division and remainder (they cannot overflow).
- Loading branch information
1 parent
7907abe
commit 69f554d
Showing
4 changed files
with
148 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters