]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/rename.rs
iterate List by value
[rust.git] / tests / ui / rename.rs
index eb08f1de63de5b16c5a33ca65910c23bf379dcca..cbd3b1e91666aa385bedc7c97daff6298d456343 100644 (file)
@@ -1,13 +1,13 @@
-// 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.
+//! Test for Clippy lint renames.
+// run-rustfix
 
-#![allow(stutter)]
+#![allow(dead_code)]
+// allow the new lint name here, to test if the new name works
+#![allow(clippy::module_name_repetitions)]
+#![allow(clippy::new_without_default)]
+#![allow(clippy::redundant_static_lifetimes)]
+// warn for the old lint name here, to test if the renaming worked
+#![warn(clippy::cyclomatic_complexity)]
 
 #[warn(clippy::stutter)]
 fn main() {}
@@ -15,8 +15,5 @@ fn main() {}
 #[warn(clippy::new_without_default_derive)]
 struct Foo;
 
-impl Foo {
-    fn new() -> Self {
-        Foo
-    }
-}
+#[warn(clippy::const_static_lifetime)]
+fn foo() {}