2020-11-05 13:29:48 +00:00
|
|
|
error: this operation will panic at runtime
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:30:5
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
|
LL | i /= 0;
|
|
|
|
| ^^^^^^ attempt to divide `_` by zero
|
|
|
|
|
|
|
|
|
= note: `#[deny(unconditional_panic)]` on by default
|
|
|
|
|
|
|
|
error: this operation will panic at runtime
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:35:5
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
|
LL | i %= 0;
|
|
|
|
| ^^^^^^ attempt to calculate the remainder of `_` with a divisor of zero
|
|
|
|
|
2020-03-18 14:41:42 +00:00
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:9:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
|
LL | 1 + i;
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::integer-arithmetic` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:10:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
|
LL | i * 2;
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:11:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
|
LL | / 1 %
|
|
|
|
LL | | i / 2; // no error, this is part of the expression in the preceding line
|
2020-11-05 13:29:48 +00:00
|
|
|
| |_____^
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:13:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
|
LL | i - 2 + 2 - i;
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:14:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
|
LL | -i;
|
|
|
|
| ^^
|
|
|
|
|
2020-04-13 03:11:19 +00:00
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:15:5
|
2020-04-13 03:11:19 +00:00
|
|
|
|
|
|
|
|
LL | i >> 1;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:16:5
|
2020-04-13 03:11:19 +00:00
|
|
|
|
|
|
|
|
LL | i << 1;
|
|
|
|
| ^^^^^^
|
|
|
|
|
2020-03-18 14:41:42 +00:00
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:26:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
|
LL | i += 1;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:27:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
|
LL | i -= 1;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:28:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
|
LL | i *= 2;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:31:11
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
2020-11-05 13:29:48 +00:00
|
|
|
LL | i /= -1;
|
|
|
|
| ^
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:32:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
2020-11-05 13:29:48 +00:00
|
|
|
LL | i /= var1;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:33:5
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
|
LL | i /= var2;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:36:11
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
|
LL | i %= -1;
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:37:5
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
|
LL | i %= var1;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:38:5
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
|
LL | i %= var2;
|
|
|
|
| ^^^^^^^^^
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:39:5
|
2020-04-13 03:11:19 +00:00
|
|
|
|
|
|
|
|
LL | i <<= 3;
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:40:5
|
2020-04-13 03:11:19 +00:00
|
|
|
|
|
|
|
|
LL | i >>= 2;
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:82:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
|
LL | 3 + &1;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:83:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
|
LL | &3 + 1;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:84:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
|
LL | &3 + &1;
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:89:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
|
LL | a + x
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:93:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
|
LL | x + y
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:97:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
|
LL | x + y
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2021-10-07 09:21:30 +00:00
|
|
|
--> $DIR/integer_arithmetic.rs:101:5
|
2020-03-18 14:41:42 +00:00
|
|
|
|
|
|
|
|
LL | (&x + &y)
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
2020-11-05 13:29:48 +00:00
|
|
|
error: aborting due to 27 previous errors
|
2020-03-18 14:41:42 +00:00
|
|
|
|