mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 10:07:30 +00:00
157 lines
6.0 KiB
Plaintext
157 lines
6.0 KiB
Plaintext
|
error: you are using modulo operator on constants with different signs: `-1 % 2`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:13:5
|
||
|
|
|
||
|
LL | -1 % 2;
|
||
|
| ^^^^^^
|
||
|
|
|
||
|
= note: `-D clippy::modulo-arithmetic` implied by `-D warnings`
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `1 % -2`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:14:5
|
||
|
|
|
||
|
LL | 1 % -2;
|
||
|
| ^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `-1 % 3`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:15:5
|
||
|
|
|
||
|
LL | (1 - 2) % (1 + 2);
|
||
|
| ^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `3 % -1`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:16:5
|
||
|
|
|
||
|
LL | (1 + 2) % (1 - 2);
|
||
|
| ^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `-35 % 300000`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:17:5
|
||
|
|
|
||
|
LL | 35 * (7 - 4 * 2) % (-500 * -600);
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `-1 % 2`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:19:5
|
||
|
|
|
||
|
LL | -1i8 % 2i8;
|
||
|
| ^^^^^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `1 % -2`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:20:5
|
||
|
|
|
||
|
LL | 1i8 % -2i8;
|
||
|
| ^^^^^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `-1 % 2`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:21:5
|
||
|
|
|
||
|
LL | -1i16 % 2i16;
|
||
|
| ^^^^^^^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `1 % -2`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:22:5
|
||
|
|
|
||
|
LL | 1i16 % -2i16;
|
||
|
| ^^^^^^^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `-1 % 2`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:23:5
|
||
|
|
|
||
|
LL | -1i32 % 2i32;
|
||
|
| ^^^^^^^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `1 % -2`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:24:5
|
||
|
|
|
||
|
LL | 1i32 % -2i32;
|
||
|
| ^^^^^^^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `-1 % 2`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:25:5
|
||
|
|
|
||
|
LL | -1i64 % 2i64;
|
||
|
| ^^^^^^^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `1 % -2`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:26:5
|
||
|
|
|
||
|
LL | 1i64 % -2i64;
|
||
|
| ^^^^^^^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `-1 % 2`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:27:5
|
||
|
|
|
||
|
LL | -1i128 % 2i128;
|
||
|
| ^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `1 % -2`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:28:5
|
||
|
|
|
||
|
LL | 1i128 % -2i128;
|
||
|
| ^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `-1 % 2`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:29:5
|
||
|
|
|
||
|
LL | -1isize % 2isize;
|
||
|
| ^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: you are using modulo operator on constants with different signs: `1 % -2`
|
||
|
--> $DIR/modulo_arithmetic_integral_const.rs:30:5
|
||
|
|
|
||
|
LL | 1isize % -2isize;
|
||
|
| ^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= note: double check for expected result especially when interoperating with different languages
|
||
|
= note: or consider using `rem_euclid` or similar function
|
||
|
|
||
|
error: aborting due to 17 previous errors
|
||
|
|