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 1
1
//! Test for Clippy lint renames.
2
+ // run-rustfix
2
3
4
+ #![ allow( dead_code) ]
3
5
// allow the new lint name here, to test if the new name works
4
6
#![ allow( clippy:: module_name_repetitions) ]
5
7
#![ allow( clippy:: new_without_default) ]
@@ -15,10 +17,4 @@ fn main() {}
15
17
struct Foo ;
16
18
17
19
#[ 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 1
1
error: lint `clippy::cyclomatic_complexity` has been renamed to `clippy::cognitive_complexity`
2
- --> $DIR/rename.rs:9 :9
2
+ --> $DIR/rename.rs:11 :9
3
3
|
4
4
LL | #![warn(clippy::cyclomatic_complexity)]
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::cognitive_complexity`
6
6
|
7
7
= note: `-D renamed-and-removed-lints` implied by `-D warnings`
8
8
9
9
error: lint `clippy::stutter` has been renamed to `clippy::module_name_repetitions`
10
- --> $DIR/rename.rs:11 :8
10
+ --> $DIR/rename.rs:13 :8
11
11
|
12
12
LL | #[warn(clippy::stutter)]
13
13
| ^^^^^^^^^^^^^^^ help: use the new name: `clippy::module_name_repetitions`
14
14
15
15
error: 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
17
17
|
18
18
LL | #[warn(clippy::new_without_default_derive)]
19
19
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::new_without_default`
20
20
21
21
error: 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
23
23
|
24
24
LL | #[warn(clippy::const_static_lifetime)]
25
25
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::redundant_static_lifetimes`
26
26
27
27
error: lint `clippy::cyclomatic_complexity` has been renamed to `clippy::cognitive_complexity`
28
- --> $DIR/rename.rs:9 :9
28
+ --> $DIR/rename.rs:11 :9
29
29
|
30
30
LL | #![warn(clippy::cyclomatic_complexity)]
31
31
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::cognitive_complexity`
You can’t perform that action at this time.
0 commit comments