rust/tests/ui/arithmetic.stderr

83 lines
2.1 KiB
Plaintext
Raw Normal View History

error: integer arithmetic detected
--> $DIR/arithmetic.rs:8:5
|
8 | 1 + i; //~ERROR integer arithmetic detected
| ^^^^^
|
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
|
9 | i * 2; //~ERROR integer arithmetic detected
| ^^^^^
error: integer arithmetic detected
--> $DIR/arithmetic.rs:10:5
|
10 | 1 % //~ERROR integer arithmetic detected
| _____^ starting here...
11 | | i / 2; // no error, this is part of the expression in the preceding line
| |_________^ ...ending here
error: integer arithmetic detected
--> $DIR/arithmetic.rs:12:5
|
12 | i - 2 + 2 - i; //~ERROR integer arithmetic detected
| ^^^^^^^^^^^^^
error: integer arithmetic detected
--> $DIR/arithmetic.rs:13:5
|
13 | -i; //~ERROR integer arithmetic detected
| ^^
error: floating-point arithmetic detected
--> $DIR/arithmetic.rs:23:5
|
23 | f * 2.0; //~ERROR floating-point arithmetic detected
| ^^^^^^^
|
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
|
25 | 1.0 + f; //~ERROR floating-point arithmetic detected
| ^^^^^^^
error: floating-point arithmetic detected
--> $DIR/arithmetic.rs:26:5
|
26 | f * 2.0; //~ERROR floating-point arithmetic detected
| ^^^^^^^
error: floating-point arithmetic detected
--> $DIR/arithmetic.rs:27:5
|
27 | f / 2.0; //~ERROR floating-point arithmetic detected
| ^^^^^^^
error: floating-point arithmetic detected
--> $DIR/arithmetic.rs:28:5
|
28 | f - 2.0 * 4.2; //~ERROR floating-point arithmetic detected
| ^^^^^^^^^^^^^
error: floating-point arithmetic detected
--> $DIR/arithmetic.rs:29:5
|
29 | -f; //~ERROR floating-point arithmetic detected
| ^^
error: aborting due to 11 previous errors