2019-12-26 06:34:55 -06:00
|
|
|
error: you are using modulo operator on constants with different signs: `-1 % 2`
|
2022-04-07 12:39:59 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:11:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
LL | -1 % 2;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
= note: double check for expected result especially when interoperating with different languages
|
|
|
|
= note: or consider using `rem_euclid` or similar function
|
2022-09-22 11:04:22 -05:00
|
|
|
= note: `-D clippy::modulo-arithmetic` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::modulo_arithmetic)]`
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
error: you are using modulo operator on constants with different signs: `1 % -2`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:14:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:17:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:20:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:23:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:27:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:30:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:33:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:36:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:39:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:42:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:45:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:48:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:51:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:54:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:57:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/modulo_arithmetic_integral_const.rs:60:5
|
2019-12-26 06:34:55 -06:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|