mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
127 lines
2.4 KiB
Text
127 lines
2.4 KiB
Text
error: integer arithmetic detected
|
|
--> $DIR/arithmetic.rs:13:5
|
|
|
|
|
LL | 1 + i;
|
|
| ^^^^^
|
|
|
|
|
= note: `-D clippy::integer-arithmetic` implied by `-D warnings`
|
|
|
|
error: integer arithmetic detected
|
|
--> $DIR/arithmetic.rs:14:5
|
|
|
|
|
LL | i * 2;
|
|
| ^^^^^
|
|
|
|
error: integer arithmetic detected
|
|
--> $DIR/arithmetic.rs:15:5
|
|
|
|
|
LL | / 1 %
|
|
LL | | i / 2; // no error, this is part of the expression in the preceding line
|
|
| |_________^
|
|
|
|
error: integer arithmetic detected
|
|
--> $DIR/arithmetic.rs:17:5
|
|
|
|
|
LL | i - 2 + 2 - i;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: integer arithmetic detected
|
|
--> $DIR/arithmetic.rs:18:5
|
|
|
|
|
LL | -i;
|
|
| ^^
|
|
|
|
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
|
|
--> $DIR/arithmetic.rs:32:5
|
|
|
|
|
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
|
|
|
|
|
LL | f * 2.0;
|
|
| ^^^^^^^
|
|
|
|
|
= note: `-D clippy::float-arithmetic` implied by `-D warnings`
|
|
|
|
error: floating-point arithmetic detected
|
|
--> $DIR/arithmetic.rs:47:5
|
|
|
|
|
LL | 1.0 + f;
|
|
| ^^^^^^^
|
|
|
|
error: floating-point arithmetic detected
|
|
--> $DIR/arithmetic.rs:48:5
|
|
|
|
|
LL | f * 2.0;
|
|
| ^^^^^^^
|
|
|
|
error: floating-point arithmetic detected
|
|
--> $DIR/arithmetic.rs:49:5
|
|
|
|
|
LL | f / 2.0;
|
|
| ^^^^^^^
|
|
|
|
error: floating-point arithmetic detected
|
|
--> $DIR/arithmetic.rs:50:5
|
|
|
|
|
LL | f - 2.0 * 4.2;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: floating-point arithmetic detected
|
|
--> $DIR/arithmetic.rs:51:5
|
|
|
|
|
LL | -f;
|
|
| ^^
|
|
|
|
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
|
|
|