2017-05-17 07:19:44 -05:00
|
|
|
error: integer arithmetic detected
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/arithmetic.rs:13:5
|
2018-10-06 11:18:06 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | 1 + i;
|
2018-10-06 11:18:06 -05:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::integer-arithmetic` implied by `-D warnings`
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/arithmetic.rs:14:5
|
2018-10-06 11:18:06 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | i * 2;
|
2018-10-06 11:18:06 -05:00
|
|
|
| ^^^^^
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/arithmetic.rs:15:5
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | / 1 %
|
|
|
|
LL | | i / 2; // no error, this is part of the expression in the preceding line
|
2017-05-17 07:19:44 -05:00
|
|
|
| |_________^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/arithmetic.rs:17:5
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | i - 2 + 2 - i;
|
2017-05-17 07:19:44 -05:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
2019-01-21 06:59:49 -06:00
|
|
|
error: integer arithmetic detected
|
|
|
|
--> $DIR/arithmetic.rs:18:5
|
|
|
|
|
|
|
|
|
LL | -i;
|
|
|
|
| ^^
|
|
|
|
|
2019-09-26 02:47:06 -05:00
|
|
|
error: integer arithmetic detected
|
|
|
|
--> $DIR/arithmetic.rs:30:5
|
|
|
|
|
|
|
|
|
LL | i += 1;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
|
|
|
--> $DIR/arithmetic.rs:31:5
|
|
|
|
|
|
|
|
|
LL | i -= 1;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
2019-01-21 06:59:49 -06:00
|
|
|
--> $DIR/arithmetic.rs:32:5
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2019-09-26 02:47:06 -05:00
|
|
|
LL | i *= 2;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
|
|
|
--> $DIR/arithmetic.rs:33:5
|
|
|
|
|
|
|
|
|
LL | i /= 2;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: integer arithmetic detected
|
|
|
|
--> $DIR/arithmetic.rs:34:5
|
|
|
|
|
|
|
|
|
LL | i %= 2;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: floating-point arithmetic detected
|
|
|
|
--> $DIR/arithmetic.rs:45:5
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | f * 2.0;
|
2017-05-17 07:19:44 -05:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
= note: `-D clippy::float-arithmetic` implied by `-D warnings`
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
|
|
error: floating-point arithmetic detected
|
2019-09-26 02:47:06 -05:00
|
|
|
--> $DIR/arithmetic.rs:47:5
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | 1.0 + f;
|
2017-05-17 07:19:44 -05:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: floating-point arithmetic detected
|
2019-09-26 02:47:06 -05:00
|
|
|
--> $DIR/arithmetic.rs:48:5
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | f * 2.0;
|
2017-05-17 07:19:44 -05:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: floating-point arithmetic detected
|
2019-09-26 02:47:06 -05:00
|
|
|
--> $DIR/arithmetic.rs:49:5
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | f / 2.0;
|
2017-05-17 07:19:44 -05:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: floating-point arithmetic detected
|
2019-09-26 02:47:06 -05:00
|
|
|
--> $DIR/arithmetic.rs:50:5
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | f - 2.0 * 4.2;
|
2017-05-17 07:19:44 -05:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: floating-point arithmetic detected
|
2019-09-26 02:47:06 -05:00
|
|
|
--> $DIR/arithmetic.rs:51:5
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | -f;
|
2017-05-17 07:19:44 -05:00
|
|
|
| ^^
|
|
|
|
|
2019-09-26 02:47:06 -05:00
|
|
|
error: floating-point arithmetic detected
|
|
|
|
--> $DIR/arithmetic.rs:53:5
|
|
|
|
|
|
|
|
|
LL | f += 1.0;
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: floating-point arithmetic detected
|
|
|
|
--> $DIR/arithmetic.rs:54:5
|
|
|
|
|
|
|
|
|
LL | f -= 1.0;
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: floating-point arithmetic detected
|
|
|
|
--> $DIR/arithmetic.rs:55:5
|
|
|
|
|
|
|
|
|
LL | f *= 2.0;
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: floating-point arithmetic detected
|
|
|
|
--> $DIR/arithmetic.rs:56:5
|
|
|
|
|
|
|
|
|
LL | f /= 2.0;
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 20 previous errors
|
2018-01-16 10:06:27 -06:00
|
|
|
|