rust-clippy/tests/ui/arithmetic.stderr

74 lines
1.4 KiB
Text
Raw Normal View History

error: integer arithmetic detected
2018-10-06 16:18:06 +00:00
--> $DIR/arithmetic.rs:18:5
|
18 | 1 + i;
| ^^^^^
|
= note: `-D clippy::integer-arithmetic` implied by `-D warnings`
error: integer arithmetic detected
2018-10-06 16:18:06 +00:00
--> $DIR/arithmetic.rs:19:5
|
19 | i * 2;
| ^^^^^
error: integer arithmetic detected
2018-10-06 16:18:06 +00:00
--> $DIR/arithmetic.rs:20:5
|
2018-10-06 16:18:06 +00:00
20 | / 1 %
21 | | i / 2; // no error, this is part of the expression in the preceding line
| |_________^
error: integer arithmetic detected
2018-10-06 16:18:06 +00:00
--> $DIR/arithmetic.rs:22:5
|
2018-10-06 16:18:06 +00:00
22 | i - 2 + 2 - i;
| ^^^^^^^^^^^^^
error: integer arithmetic detected
2018-10-06 16:18:06 +00:00
--> $DIR/arithmetic.rs:23:5
|
2018-10-06 16:18:06 +00:00
23 | -i;
| ^^
error: floating-point arithmetic detected
2018-10-06 16:18:06 +00:00
--> $DIR/arithmetic.rs:33:5
|
2018-10-06 16:18:06 +00:00
33 | f * 2.0;
| ^^^^^^^
|
= note: `-D clippy::float-arithmetic` implied by `-D warnings`
error: floating-point arithmetic detected
2018-10-06 16:18:06 +00:00
--> $DIR/arithmetic.rs:35:5
|
2018-10-06 16:18:06 +00:00
35 | 1.0 + f;
| ^^^^^^^
error: floating-point arithmetic detected
2018-10-06 16:18:06 +00:00
--> $DIR/arithmetic.rs:36:5
|
2018-10-06 16:18:06 +00:00
36 | f * 2.0;
| ^^^^^^^
error: floating-point arithmetic detected
2018-10-06 16:18:06 +00:00
--> $DIR/arithmetic.rs:37:5
|
2018-10-06 16:18:06 +00:00
37 | f / 2.0;
| ^^^^^^^
error: floating-point arithmetic detected
2018-10-06 16:18:06 +00:00
--> $DIR/arithmetic.rs:38:5
|
2018-10-06 16:18:06 +00:00
38 | f - 2.0 * 4.2;
| ^^^^^^^^^^^^^
error: floating-point arithmetic detected
2018-10-06 16:18:06 +00:00
--> $DIR/arithmetic.rs:39:5
|
2018-10-06 16:18:06 +00:00
39 | -f;
| ^^
2018-01-16 16:06:27 +00:00
error: aborting due to 11 previous errors