rust-clippy/tests/ui-toml/modulo_arithmetic/modulo_arithmetic.rs

11 lines
178 B
Rust
Raw Normal View History

#![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;
}