mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
74 lines
1.4 KiB
Plaintext
74 lines
1.4 KiB
Plaintext
error: integer arithmetic detected
|
|
--> $DIR/arithmetic.rs:22:5
|
|
|
|
|
22 | 1 + i;
|
|
| ^^^^^
|
|
|
|
|
= note: `-D clippy::integer-arithmetic` implied by `-D warnings`
|
|
|
|
error: integer arithmetic detected
|
|
--> $DIR/arithmetic.rs:23:5
|
|
|
|
|
23 | i * 2;
|
|
| ^^^^^
|
|
|
|
error: integer arithmetic detected
|
|
--> $DIR/arithmetic.rs:24:5
|
|
|
|
|
24 | / 1 %
|
|
25 | | i / 2; // no error, this is part of the expression in the preceding line
|
|
| |_________^
|
|
|
|
error: integer arithmetic detected
|
|
--> $DIR/arithmetic.rs:26:5
|
|
|
|
|
26 | i - 2 + 2 - i;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: integer arithmetic detected
|
|
--> $DIR/arithmetic.rs:27:5
|
|
|
|
|
27 | -i;
|
|
| ^^
|
|
|
|
error: floating-point arithmetic detected
|
|
--> $DIR/arithmetic.rs:37:5
|
|
|
|
|
37 | f * 2.0;
|
|
| ^^^^^^^
|
|
|
|
|
= note: `-D clippy::float-arithmetic` implied by `-D warnings`
|
|
|
|
error: floating-point arithmetic detected
|
|
--> $DIR/arithmetic.rs:39:5
|
|
|
|
|
39 | 1.0 + f;
|
|
| ^^^^^^^
|
|
|
|
error: floating-point arithmetic detected
|
|
--> $DIR/arithmetic.rs:40:5
|
|
|
|
|
40 | f * 2.0;
|
|
| ^^^^^^^
|
|
|
|
error: floating-point arithmetic detected
|
|
--> $DIR/arithmetic.rs:41:5
|
|
|
|
|
41 | f / 2.0;
|
|
| ^^^^^^^
|
|
|
|
error: floating-point arithmetic detected
|
|
--> $DIR/arithmetic.rs:42:5
|
|
|
|
|
42 | f - 2.0 * 4.2;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: floating-point arithmetic detected
|
|
--> $DIR/arithmetic.rs:43:5
|
|
|
|
|
43 | -f;
|
|
| ^^
|
|
|
|
error: aborting due to 11 previous errors
|
|
|