mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
e456c28e11
Add lint configuration for `modulo_arithmetic` Collect meta-data
10 lines
178 B
Rust
10 lines
178 B
Rust
#![warn(clippy::modulo_arithmetic)]
|
|
|
|
fn main() {
|
|
let a = -1;
|
|
let b = 2;
|
|
let c = a % b == 0;
|
|
let c = a % b != 0;
|
|
let c = 0 == a % b;
|
|
let c = 0 != a % b;
|
|
}
|