]> 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 4fe523e48dea1037a1222b40d91991cbe2c23f2c..6d9b9499dce310ec5b768af8e17fb60ebd5d1af2 100644 (file)
@@ -1,12 +1,22 @@
-#![feature(tool_lints)]
-
+// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
 
 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)]
@@ -17,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);