rust/tests/ui/arithmetic.stderr

82 lines
1.6 KiB
Plaintext
Raw Normal View History

error: integer arithmetic detected
--> $DIR/arithmetic.rs:8:5
|
2017-02-08 13:58:07 +00:00
8 | 1 + i;
| ^^^^^
|
note: lint level defined here
--> $DIR/arithmetic.rs:4:9
|
4 | #![deny(integer_arithmetic, float_arithmetic)]
| ^^^^^^^^^^^^^^^^^^
error: integer arithmetic detected
--> $DIR/arithmetic.rs:9:5
|
2017-02-08 13:58:07 +00:00
9 | i * 2;
| ^^^^^
error: integer arithmetic detected
--> $DIR/arithmetic.rs:10:5
|
10 | / 1 %
11 | | i / 2; // no error, this is part of the expression in the preceding line
| |_________^
error: integer arithmetic detected
--> $DIR/arithmetic.rs:12:5
|
2017-02-08 13:58:07 +00:00
12 | i - 2 + 2 - i;
| ^^^^^^^^^^^^^
error: integer arithmetic detected
--> $DIR/arithmetic.rs:13:5
|
2017-02-08 13:58:07 +00:00
13 | -i;
| ^^
error: floating-point arithmetic detected
--> $DIR/arithmetic.rs:23:5
|
2017-02-08 13:58:07 +00:00
23 | f * 2.0;
| ^^^^^^^
|
note: lint level defined here
--> $DIR/arithmetic.rs:4:29
|
4 | #![deny(integer_arithmetic, float_arithmetic)]
| ^^^^^^^^^^^^^^^^
error: floating-point arithmetic detected
--> $DIR/arithmetic.rs:25:5
|
2017-02-08 13:58:07 +00:00
25 | 1.0 + f;
| ^^^^^^^
error: floating-point arithmetic detected
--> $DIR/arithmetic.rs:26:5
|
2017-02-08 13:58:07 +00:00
26 | f * 2.0;
| ^^^^^^^
error: floating-point arithmetic detected
--> $DIR/arithmetic.rs:27:5
|
2017-02-08 13:58:07 +00:00
27 | f / 2.0;
| ^^^^^^^
error: floating-point arithmetic detected
--> $DIR/arithmetic.rs:28:5
|
2017-02-08 13:58:07 +00:00
28 | f - 2.0 * 4.2;
| ^^^^^^^^^^^^^
error: floating-point arithmetic detected
--> $DIR/arithmetic.rs:29:5
|
2017-02-08 13:58:07 +00:00
29 | -f;
| ^^
error: aborting due to 11 previous errors