mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 01:55:03 +00:00
5823e9468d
This mostly affects loop checks and the modulo_one lint. Tests were also updated where applicable.
15 lines
226 B
Rust
15 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;
|
|
}
|