File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ impl LateLintPass for Arithmetic {
55
55
match expr. node {
56
56
hir:: ExprBinary ( ref op, ref l, ref r) => {
57
57
match op. node {
58
- hir:: BiRem | hir :: BiAnd | hir:: BiOr | hir:: BiBitAnd |
58
+ hir:: BiAnd | hir:: BiOr | hir:: BiBitAnd |
59
59
hir:: BiBitOr | hir:: BiBitXor | hir:: BiShl | hir:: BiShr |
60
60
hir:: BiEq | hir:: BiLt | hir:: BiLe | hir:: BiNe | hir:: BiGe |
61
61
hir:: BiGt => return ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ fn main() {
8
8
1 + i; //~ERROR integer arithmetic detected
9
9
i * 2 ; //~ERROR integer arithmetic detected
10
10
1 % //~ERROR integer arithmetic detected
11
- i / 2 ;
11
+ i / 2 ; // no error, this is part of the expression in the preceding line
12
12
i - 2 + 2 - i; //~ERROR integer arithmetic detected
13
13
-i; //~ERROR integer arithmetic detected
14
14
You can’t perform that action at this time.
0 commit comments