]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/modulo_one.rs
iterate List by value
[rust.git] / tests / ui / modulo_one.rs
index 847ea1d9ab64fa571656e2c89c69b012b4d18485..cc8c8e7cdaefd5a203b3e9839fe1db98dfdc9fc8 100644 (file)
@@ -1,9 +1,14 @@
+#![warn(clippy::modulo_one)]
+#![allow(clippy::no_effect, clippy::unnecessary_operation)]
 
-
-#![warn(modulo_one)]
-#![allow(no_effect, unnecessary_operation)]
+static STATIC_ONE: usize = 2 - 1;
 
 fn main() {
     10 % 1;
     10 % 2;
+
+    const ONE: u32 = 1 * 1;
+
+    2 % ONE;
+    5 % STATIC_ONE;
 }