rust/tests/ui/arithmetic.stderr

74 lines
1.4 KiB
Text
Raw Normal View History

error: integer arithmetic detected
2018-12-10 06:27:19 +01:00
--> $DIR/arithmetic.rs:22:5
2018-10-06 18:18:06 +02:00
|
2018-12-27 16:57:55 +01:00
LL | 1 + i;
2018-10-06 18:18:06 +02:00
| ^^^^^
|
= note: `-D clippy::integer-arithmetic` implied by `-D warnings`
error: integer arithmetic detected
2018-12-10 06:27:19 +01:00
--> $DIR/arithmetic.rs:23:5
2018-10-06 18:18:06 +02:00
|
2018-12-27 16:57:55 +01:00
LL | i * 2;
2018-10-06 18:18:06 +02:00
| ^^^^^
error: integer arithmetic detected
2018-12-10 06:27:19 +01:00
--> $DIR/arithmetic.rs:24:5
|
2018-12-27 16:57:55 +01:00
LL | / 1 %
LL | | i / 2; // no error, this is part of the expression in the preceding line
| |_________^
error: integer arithmetic detected
2018-12-10 06:27:19 +01:00
--> $DIR/arithmetic.rs:26:5
|
2018-12-27 16:57:55 +01:00
LL | i - 2 + 2 - i;
| ^^^^^^^^^^^^^
error: integer arithmetic detected
2018-12-10 06:27:19 +01:00
--> $DIR/arithmetic.rs:27:5
|
2018-12-27 16:57:55 +01:00
LL | -i;
| ^^
error: floating-point arithmetic detected
2018-12-10 06:27:19 +01:00
--> $DIR/arithmetic.rs:37:5
|
2018-12-27 16:57:55 +01:00
LL | f * 2.0;
| ^^^^^^^
|
= note: `-D clippy::float-arithmetic` implied by `-D warnings`
error: floating-point arithmetic detected
2018-12-10 06:27:19 +01:00
--> $DIR/arithmetic.rs:39:5
|
2018-12-27 16:57:55 +01:00
LL | 1.0 + f;
| ^^^^^^^
error: floating-point arithmetic detected
2018-12-10 06:27:19 +01:00
--> $DIR/arithmetic.rs:40:5
|
2018-12-27 16:57:55 +01:00
LL | f * 2.0;
| ^^^^^^^
error: floating-point arithmetic detected
2018-12-10 06:27:19 +01:00
--> $DIR/arithmetic.rs:41:5
|
2018-12-27 16:57:55 +01:00
LL | f / 2.0;
| ^^^^^^^
error: floating-point arithmetic detected
2018-12-10 06:27:19 +01:00
--> $DIR/arithmetic.rs:42:5
|
2018-12-27 16:57:55 +01:00
LL | f - 2.0 * 4.2;
| ^^^^^^^^^^^^^
error: floating-point arithmetic detected
2018-12-10 06:27:19 +01:00
--> $DIR/arithmetic.rs:43:5
|
2018-12-27 16:57:55 +01:00
LL | -f;
| ^^
2018-01-16 17:06:27 +01:00
error: aborting due to 11 previous errors