]> git.lizzy.rs Git - rust.git/blob - tests/ui/modulo_one.rs
Merge remote-tracking branch 'upstream/rust-1.36.0' into backport_merge
[rust.git] / tests / ui / modulo_one.rs
1 #![warn(clippy::modulo_one)]
2 #![allow(clippy::no_effect, clippy::unnecessary_operation)]
3
4 static STATIC_ONE: usize = 2 - 1;
5
6 fn main() {
7     10 % 1;
8     10 % 2;
9
10     const ONE: u32 = 1 * 1;
11
12     2 % ONE;
13     5 % STATIC_ONE;
14 }