rust-clippy/tests/ui/arithmetic.stderr

74 lines
1.4 KiB
Text
Raw Normal View History

error: integer arithmetic detected
--> $DIR/arithmetic.rs:13:5
2018-10-06 16:18:06 +00:00
|
2018-12-27 15:57:55 +00:00
LL | 1 + i;
2018-10-06 16:18:06 +00:00
| ^^^^^
|
= note: `-D clippy::integer-arithmetic` implied by `-D warnings`
error: integer arithmetic detected
--> $DIR/arithmetic.rs:14:5
2018-10-06 16:18:06 +00:00
|
2018-12-27 15:57:55 +00:00
LL | i * 2;
2018-10-06 16:18:06 +00:00
| ^^^^^
error: integer arithmetic detected
--> $DIR/arithmetic.rs:15:5
|
2018-12-27 15:57:55 +00:00
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
|
2018-12-27 15:57:55 +00:00
LL | i - 2 + 2 - i;
| ^^^^^^^^^^^^^
2019-01-21 12:59:49 +00:00
error: integer arithmetic detected
--> $DIR/arithmetic.rs:18:5
|
LL | -i;
| ^^
error: floating-point arithmetic detected
2019-01-21 12:59:49 +00:00
--> $DIR/arithmetic.rs:32:5
|
2018-12-27 15:57:55 +00:00
LL | f * 2.0;
| ^^^^^^^
|
= note: `-D clippy::float-arithmetic` implied by `-D warnings`
error: floating-point arithmetic detected
2019-01-21 12:59:49 +00:00
--> $DIR/arithmetic.rs:34:5
|
2018-12-27 15:57:55 +00:00
LL | 1.0 + f;
| ^^^^^^^
error: floating-point arithmetic detected
2019-01-21 12:59:49 +00:00
--> $DIR/arithmetic.rs:35:5
|
2018-12-27 15:57:55 +00:00
LL | f * 2.0;
| ^^^^^^^
error: floating-point arithmetic detected
2019-01-21 12:59:49 +00:00
--> $DIR/arithmetic.rs:36:5
|
2018-12-27 15:57:55 +00:00
LL | f / 2.0;
| ^^^^^^^
error: floating-point arithmetic detected
2019-01-21 12:59:49 +00:00
--> $DIR/arithmetic.rs:37:5
|
2018-12-27 15:57:55 +00:00
LL | f - 2.0 * 4.2;
| ^^^^^^^^^^^^^
error: floating-point arithmetic detected
2019-01-21 12:59:49 +00:00
--> $DIR/arithmetic.rs:38:5
|
2018-12-27 15:57:55 +00:00
LL | -f;
| ^^
2019-01-21 12:59:49 +00:00
error: aborting due to 11 previous errors
2018-01-16 16:06:27 +00:00