]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/needless_continue.rs
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / needless_continue.rs
index 4a15987ba967fa1c8a8c8447b426c0c0f2025ce7..6d9b9499dce310ec5b768af8e17fb60ebd5d1af2 100644 (file)
@@ -7,16 +7,16 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-#![feature(tool_lints)]
-
-
 macro_rules! zero {
-    ($x:expr) => ($x == 0);
+    ($x:expr) => {
+        $x == 0
+    };
 }
 
 macro_rules! nonzero {
-    ($x:expr) => (!zero!($x));
+    ($x:expr) => {
+        !zero!($x)
+    };
 }
 
 #[warn(clippy::needless_continue)]
@@ -27,9 +27,9 @@ fn main() {
 
         if i % 2 == 0 && i % 3 == 0 {
             println!("{}", i);
-            println!("{}", i+1);
+            println!("{}", i + 1);
             if i % 5 == 0 {
-                println!("{}", i+2);
+                println!("{}", i + 2);
             }
             let i = 0;
             println!("bar {} ", i);