mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-21 02:23:19 +00:00
e456c28e11
Add lint configuration for `modulo_arithmetic` Collect meta-data
40 lines
1.5 KiB
Text
40 lines
1.5 KiB
Text
error: you are using modulo operator on types that might have different signs
|
|
--> $DIR/modulo_arithmetic.rs:6:13
|
|
|
|
|
LL | let c = a % b == 0;
|
|
| ^^^^^
|
|
|
|
|
= note: double check for expected result especially when interoperating with different languages
|
|
= note: or consider using `rem_euclid` or similar function
|
|
= note: `-D clippy::modulo-arithmetic` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::modulo_arithmetic)]`
|
|
|
|
error: you are using modulo operator on types that might have different signs
|
|
--> $DIR/modulo_arithmetic.rs:7:13
|
|
|
|
|
LL | let c = a % b != 0;
|
|
| ^^^^^
|
|
|
|
|
= 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 types that might have different signs
|
|
--> $DIR/modulo_arithmetic.rs:8:18
|
|
|
|
|
LL | let c = 0 == a % b;
|
|
| ^^^^^
|
|
|
|
|
= 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 types that might have different signs
|
|
--> $DIR/modulo_arithmetic.rs:9:18
|
|
|
|
|
LL | let c = 0 != a % b;
|
|
| ^^^^^
|
|
|
|
|
= 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 4 previous errors
|
|
|