]> 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 b6f9513be448dfb2b59ad38f12e987cc84c7bbc4..6d9b9499dce310ec5b768af8e17fb60ebd5d1af2 100644 (file)
@@ -1,15 +1,25 @@
-#![feature(plugin)]
-#![plugin(clippy)]
+// 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)
+    };
 }
 
-#[deny(needless_continue)]
+#[warn(clippy::needless_continue)]
 fn main() {
     let mut i = 1;
     while i < 10 {
@@ -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);