|
| 1 | +error: this operation will panic at runtime |
| 2 | + --> $DIR/integer_arithmetic.rs:37:5 |
| 3 | + | |
| 4 | +LL | i /= 0; |
| 5 | + | ^^^^^^ attempt to divide `_` by zero |
| 6 | + | |
| 7 | + = note: `#[deny(unconditional_panic)]` on by default |
| 8 | + |
| 9 | +error: this operation will panic at runtime |
| 10 | + --> $DIR/integer_arithmetic.rs:42:5 |
| 11 | + | |
| 12 | +LL | i %= 0; |
| 13 | + | ^^^^^^ attempt to calculate the remainder of `_` with a divisor of zero |
| 14 | + |
1 | 15 | error: integer arithmetic detected |
2 | | - --> $DIR/integer_arithmetic.rs:14:5 |
| 16 | + --> $DIR/integer_arithmetic.rs:16:5 |
3 | 17 | | |
4 | 18 | LL | 1 + i; |
5 | 19 | | ^^^^^ |
6 | 20 | | |
7 | 21 | = note: `-D clippy::integer-arithmetic` implied by `-D warnings` |
8 | 22 |
|
9 | 23 | error: integer arithmetic detected |
10 | | - --> $DIR/integer_arithmetic.rs:15:5 |
| 24 | + --> $DIR/integer_arithmetic.rs:17:5 |
11 | 25 | | |
12 | 26 | LL | i * 2; |
13 | 27 | | ^^^^^ |
14 | 28 |
|
15 | 29 | error: integer arithmetic detected |
16 | | - --> $DIR/integer_arithmetic.rs:16:5 |
| 30 | + --> $DIR/integer_arithmetic.rs:18:5 |
17 | 31 | | |
18 | 32 | LL | / 1 % |
19 | 33 | LL | | i / 2; // no error, this is part of the expression in the preceding line |
20 | | - | |_________^ |
| 34 | + | |_____^ |
21 | 35 |
|
22 | 36 | error: integer arithmetic detected |
23 | | - --> $DIR/integer_arithmetic.rs:18:5 |
| 37 | + --> $DIR/integer_arithmetic.rs:20:5 |
24 | 38 | | |
25 | 39 | LL | i - 2 + 2 - i; |
26 | 40 | | ^^^^^^^^^^^^^ |
27 | 41 |
|
28 | 42 | error: integer arithmetic detected |
29 | | - --> $DIR/integer_arithmetic.rs:19:5 |
| 43 | + --> $DIR/integer_arithmetic.rs:21:5 |
30 | 44 | | |
31 | 45 | LL | -i; |
32 | 46 | | ^^ |
33 | 47 |
|
34 | 48 | error: integer arithmetic detected |
35 | | - --> $DIR/integer_arithmetic.rs:20:5 |
| 49 | + --> $DIR/integer_arithmetic.rs:22:5 |
36 | 50 | | |
37 | 51 | LL | i >> 1; |
38 | 52 | | ^^^^^^ |
39 | 53 |
|
40 | 54 | error: integer arithmetic detected |
41 | | - --> $DIR/integer_arithmetic.rs:21:5 |
| 55 | + --> $DIR/integer_arithmetic.rs:23:5 |
42 | 56 | | |
43 | 57 | LL | i << 1; |
44 | 58 | | ^^^^^^ |
45 | 59 |
|
46 | 60 | error: integer arithmetic detected |
47 | | - --> $DIR/integer_arithmetic.rs:31:5 |
| 61 | + --> $DIR/integer_arithmetic.rs:33:5 |
48 | 62 | | |
49 | 63 | LL | i += 1; |
50 | 64 | | ^^^^^^ |
51 | 65 |
|
52 | 66 | error: integer arithmetic detected |
53 | | - --> $DIR/integer_arithmetic.rs:32:5 |
| 67 | + --> $DIR/integer_arithmetic.rs:34:5 |
54 | 68 | | |
55 | 69 | LL | i -= 1; |
56 | 70 | | ^^^^^^ |
57 | 71 |
|
58 | 72 | error: integer arithmetic detected |
59 | | - --> $DIR/integer_arithmetic.rs:33:5 |
| 73 | + --> $DIR/integer_arithmetic.rs:35:5 |
60 | 74 | | |
61 | 75 | LL | i *= 2; |
62 | 76 | | ^^^^^^ |
63 | 77 |
|
64 | 78 | error: integer arithmetic detected |
65 | | - --> $DIR/integer_arithmetic.rs:34:5 |
| 79 | + --> $DIR/integer_arithmetic.rs:37:5 |
66 | 80 | | |
67 | | -LL | i /= 2; |
| 81 | +LL | i /= 0; |
68 | 82 | | ^^^^^^ |
69 | 83 |
|
70 | 84 | error: integer arithmetic detected |
71 | | - --> $DIR/integer_arithmetic.rs:35:5 |
| 85 | + --> $DIR/integer_arithmetic.rs:38:11 |
| 86 | + | |
| 87 | +LL | i /= -1; |
| 88 | + | ^ |
| 89 | + |
| 90 | +error: integer arithmetic detected |
| 91 | + --> $DIR/integer_arithmetic.rs:39:5 |
| 92 | + | |
| 93 | +LL | i /= var1; |
| 94 | + | ^^^^^^^^^ |
| 95 | + |
| 96 | +error: integer arithmetic detected |
| 97 | + --> $DIR/integer_arithmetic.rs:40:5 |
| 98 | + | |
| 99 | +LL | i /= var2; |
| 100 | + | ^^^^^^^^^ |
| 101 | + |
| 102 | +error: integer arithmetic detected |
| 103 | + --> $DIR/integer_arithmetic.rs:42:5 |
72 | 104 | | |
73 | | -LL | i %= 2; |
| 105 | +LL | i %= 0; |
74 | 106 | | ^^^^^^ |
75 | 107 |
|
76 | 108 | error: integer arithmetic detected |
77 | | - --> $DIR/integer_arithmetic.rs:36:5 |
| 109 | + --> $DIR/integer_arithmetic.rs:43:11 |
| 110 | + | |
| 111 | +LL | i %= -1; |
| 112 | + | ^ |
| 113 | + |
| 114 | +error: integer arithmetic detected |
| 115 | + --> $DIR/integer_arithmetic.rs:44:5 |
| 116 | + | |
| 117 | +LL | i %= var1; |
| 118 | + | ^^^^^^^^^ |
| 119 | + |
| 120 | +error: integer arithmetic detected |
| 121 | + --> $DIR/integer_arithmetic.rs:45:5 |
| 122 | + | |
| 123 | +LL | i %= var2; |
| 124 | + | ^^^^^^^^^ |
| 125 | + |
| 126 | +error: integer arithmetic detected |
| 127 | + --> $DIR/integer_arithmetic.rs:46:5 |
78 | 128 | | |
79 | 129 | LL | i <<= 3; |
80 | 130 | | ^^^^^^^ |
81 | 131 |
|
82 | 132 | error: integer arithmetic detected |
83 | | - --> $DIR/integer_arithmetic.rs:37:5 |
| 133 | + --> $DIR/integer_arithmetic.rs:47:5 |
84 | 134 | | |
85 | 135 | LL | i >>= 2; |
86 | 136 | | ^^^^^^^ |
87 | 137 |
|
88 | 138 | error: integer arithmetic detected |
89 | | - --> $DIR/integer_arithmetic.rs:79:5 |
| 139 | + --> $DIR/integer_arithmetic.rs:89:5 |
90 | 140 | | |
91 | 141 | LL | 3 + &1; |
92 | 142 | | ^^^^^^ |
93 | 143 |
|
94 | 144 | error: integer arithmetic detected |
95 | | - --> $DIR/integer_arithmetic.rs:80:5 |
| 145 | + --> $DIR/integer_arithmetic.rs:90:5 |
96 | 146 | | |
97 | 147 | LL | &3 + 1; |
98 | 148 | | ^^^^^^ |
99 | 149 |
|
100 | 150 | error: integer arithmetic detected |
101 | | - --> $DIR/integer_arithmetic.rs:81:5 |
| 151 | + --> $DIR/integer_arithmetic.rs:91:5 |
102 | 152 | | |
103 | 153 | LL | &3 + &1; |
104 | 154 | | ^^^^^^^ |
105 | 155 |
|
106 | 156 | error: integer arithmetic detected |
107 | | - --> $DIR/integer_arithmetic.rs:86:5 |
| 157 | + --> $DIR/integer_arithmetic.rs:96:5 |
108 | 158 | | |
109 | 159 | LL | a + x |
110 | 160 | | ^^^^^ |
111 | 161 |
|
112 | 162 | error: integer arithmetic detected |
113 | | - --> $DIR/integer_arithmetic.rs:90:5 |
| 163 | + --> $DIR/integer_arithmetic.rs:100:5 |
114 | 164 | | |
115 | 165 | LL | x + y |
116 | 166 | | ^^^^^ |
117 | 167 |
|
118 | 168 | error: integer arithmetic detected |
119 | | - --> $DIR/integer_arithmetic.rs:94:5 |
| 169 | + --> $DIR/integer_arithmetic.rs:104:5 |
120 | 170 | | |
121 | 171 | LL | x + y |
122 | 172 | | ^^^^^ |
123 | 173 |
|
124 | 174 | error: integer arithmetic detected |
125 | | - --> $DIR/integer_arithmetic.rs:98:5 |
| 175 | + --> $DIR/integer_arithmetic.rs:108:5 |
126 | 176 | | |
127 | 177 | LL | (&x + &y) |
128 | 178 | | ^^^^^^^^^ |
129 | 179 |
|
130 | | -error: aborting due to 21 previous errors |
| 180 | +error: aborting due to 29 previous errors |
131 | 181 |
|
0 commit comments