]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/rename.rs
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / rename.rs
diff --git a/src/tools/clippy/tests/ui/rename.rs b/src/tools/clippy/tests/ui/rename.rs
new file mode 100644 (file)
index 0000000..cbd3b1e
--- /dev/null
@@ -0,0 +1,19 @@
+//! Test for Clippy lint renames.
+// run-rustfix
+
+#![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() {}
+
+#[warn(clippy::new_without_default_derive)]
+struct Foo;
+
+#[warn(clippy::const_static_lifetime)]
+fn foo() {}