mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
5823e9468d
This mostly affects loop checks and the modulo_one lint. Tests were also updated where applicable.
14 lines
226 B
Rust
14 lines
226 B
Rust
#![warn(clippy::modulo_one)]
|
|
#![allow(clippy::no_effect, clippy::unnecessary_operation)]
|
|
|
|
static STATIC_ONE: usize = 2 - 1;
|
|
|
|
fn main() {
|
|
10 % 1;
|
|
10 % 2;
|
|
|
|
const ONE: u32 = 1 * 1;
|
|
|
|
2 % ONE;
|
|
5 % STATIC_ONE;
|
|
}
|