File tree Expand file tree Collapse file tree 3 files changed +28
-12
lines changed Expand file tree Collapse file tree 3 files changed +28
-12
lines changed Original file line number Diff line number Diff line change 1+ //! Test for Clippy lint renames.
2+ // run-rustfix
3+
4+ #![allow(dead_code)]
5+ // allow the new lint name here, to test if the new name works
6+ #![allow(clippy::module_name_repetitions)]
7+ #![allow(clippy::new_without_default)]
8+ #![allow(clippy::cognitive_complexity)]
9+ #![allow(clippy::redundant_static_lifetimes)]
10+ // warn for the old lint name here, to test if the renaming worked
11+ #![warn(clippy::cognitive_complexity)]
12+
13+ #[warn(clippy::module_name_repetitions)]
14+ fn main() {}
15+
16+ #[warn(clippy::new_without_default)]
17+ struct Foo;
18+
19+ #[warn(clippy::redundant_static_lifetimes)]
20+ fn foo() {}
Original file line number Diff line number Diff line change 11//! Test for Clippy lint renames.
2+ // run-rustfix
23
4+ #![ allow( dead_code) ]
35// allow the new lint name here, to test if the new name works
46#![ allow( clippy:: module_name_repetitions) ]
57#![ allow( clippy:: new_without_default) ]
@@ -15,10 +17,4 @@ fn main() {}
1517struct Foo ;
1618
1719#[ warn( clippy:: const_static_lifetime) ]
18- static Bar : & ' static str = "baz" ;
19-
20- impl Foo {
21- fn new ( ) -> Self {
22- Foo
23- }
24- }
20+ fn foo ( ) { }
Original file line number Diff line number Diff line change 11error: lint `clippy::cyclomatic_complexity` has been renamed to `clippy::cognitive_complexity`
2- --> $DIR/rename.rs:9 :9
2+ --> $DIR/rename.rs:11 :9
33 |
44LL | #![warn(clippy::cyclomatic_complexity)]
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::cognitive_complexity`
66 |
77 = note: `-D renamed-and-removed-lints` implied by `-D warnings`
88
99error: lint `clippy::stutter` has been renamed to `clippy::module_name_repetitions`
10- --> $DIR/rename.rs:11 :8
10+ --> $DIR/rename.rs:13 :8
1111 |
1212LL | #[warn(clippy::stutter)]
1313 | ^^^^^^^^^^^^^^^ help: use the new name: `clippy::module_name_repetitions`
1414
1515error: lint `clippy::new_without_default_derive` has been renamed to `clippy::new_without_default`
16- --> $DIR/rename.rs:14 :8
16+ --> $DIR/rename.rs:16 :8
1717 |
1818LL | #[warn(clippy::new_without_default_derive)]
1919 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::new_without_default`
2020
2121error: lint `clippy::const_static_lifetime` has been renamed to `clippy::redundant_static_lifetimes`
22- --> $DIR/rename.rs:17 :8
22+ --> $DIR/rename.rs:19 :8
2323 |
2424LL | #[warn(clippy::const_static_lifetime)]
2525 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::redundant_static_lifetimes`
2626
2727error: lint `clippy::cyclomatic_complexity` has been renamed to `clippy::cognitive_complexity`
28- --> $DIR/rename.rs:9 :9
28+ --> $DIR/rename.rs:11 :9
2929 |
3030LL | #![warn(clippy::cyclomatic_complexity)]
3131 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::cognitive_complexity`
You can’t perform that action at this time.
0 commit comments