]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/needless_return.rs
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / needless_return.rs
index 403e5b8342e85e610def5be26f5337d848ecae38..101be5946f4c1ad5eafc3b96e38595add3506b9e 100644 (file)
@@ -1,7 +1,13 @@
-#![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.
 
-#![warn(needless_return)]
+#![warn(clippy::needless_return)]
 
 fn test_end_of_fn() -> bool {
     if true {
@@ -12,7 +18,7 @@ fn test_end_of_fn() -> bool {
 }
 
 fn test_no_semicolon() -> bool {
-    return true
+    return true;
 }
 
 fn test_if_block() -> bool {
@@ -28,7 +34,7 @@ fn test_match(x: bool) -> bool {
         true => return false,
         false => {
             return true;
-        }
+        },
     }
 }