File tree 3 files changed +19
-1
lines changed
3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -1153,6 +1153,7 @@ pub fn register_renamed(ls: &mut rustc::lint::LintStore) {
1153
1153
ls. register_renamed ( "clippy::stutter" , "clippy::module_name_repetitions" ) ;
1154
1154
ls. register_renamed ( "clippy::new_without_default_derive" , "clippy::new_without_default" ) ;
1155
1155
ls. register_renamed ( "clippy::cyclomatic_complexity" , "clippy::cognitive_complexity" ) ;
1156
+ ls. register_renamed ( "clippy::const_static_lifetime" , "clippy::redundant_static_lifetimes" ) ;
1156
1157
}
1157
1158
1158
1159
// only exists to let the dogfood integration test works.
Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ fn main() {}
7
7
#[ warn( clippy:: new_without_default_derive) ]
8
8
struct Foo ;
9
9
10
+ #[ warn( clippy:: const_static_lifetime) ]
11
+ static Bar : & ' static str = "baz" ;
12
+
10
13
impl Foo {
11
14
fn new ( ) -> Self {
12
15
Foo
Original file line number Diff line number Diff line change @@ -26,6 +26,12 @@ error: lint `clippy::new_without_default_derive` has been renamed to `clippy::ne
26
26
LL | #[warn(clippy::new_without_default_derive)]
27
27
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::new_without_default`
28
28
29
+ error: lint `clippy::const_static_lifetime` has been renamed to `clippy::redundant_static_lifetimes`
30
+ --> $DIR/rename.rs:10:8
31
+ |
32
+ LL | #[warn(clippy::const_static_lifetime)]
33
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::redundant_static_lifetimes`
34
+
29
35
error: unknown lint: `stutter`
30
36
--> $DIR/rename.rs:1:10
31
37
|
@@ -38,5 +44,13 @@ error: lint `clippy::cyclomatic_complexity` has been renamed to `clippy::cogniti
38
44
LL | #![warn(clippy::cyclomatic_complexity)]
39
45
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::cognitive_complexity`
40
46
41
- error: aborting due to 6 previous errors
47
+ error: Statics have by default a `'static` lifetime
48
+ --> $DIR/rename.rs:11:14
49
+ |
50
+ LL | static Bar: &'static str = "baz";
51
+ | -^^^^^^^---- help: consider removing `'static`: `&str`
52
+ |
53
+ = note: `-D clippy::redundant-static-lifetimes` implied by `-D warnings`
54
+
55
+ error: aborting due to 8 previous errors
42
56
You can’t perform that action at this time.
0 commit comments