1 #![warn(clippy::modulo_arithmetic)]
5 clippy::shadow_unrelated,
7 clippy::unnecessary_operation,
12 // Lint when both sides are const and of the opposite sign
15 (1.1 - 2.3) % (1.1 + 2.3);
16 (1.1 + 2.3) % (1.1 - 2.3);
18 // Lint on floating point numbers
19 let a_f32: f32 = -1.6;
20 let mut b_f32: f32 = 2.1;
25 let a_f64: f64 = -1.6;
26 let mut b_f64: f64 = 2.1;
31 // No lint when both sides are const and of the same sign
34 (1.1 + 2.3) % (-1.1 + 2.3);
35 (-1.1 - 2.3) % (1.1 - 2.3);