File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 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) {
11531153 ls. register_renamed ( "clippy::stutter" , "clippy::module_name_repetitions" ) ;
11541154 ls. register_renamed ( "clippy::new_without_default_derive" , "clippy::new_without_default" ) ;
11551155 ls. register_renamed ( "clippy::cyclomatic_complexity" , "clippy::cognitive_complexity" ) ;
1156+ ls. register_renamed ( "clippy::const_static_lifetime" , "clippy::redundant_static_lifetimes" ) ;
11561157}
11571158
11581159// 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() {}
77#[ warn( clippy:: new_without_default_derive) ]
88struct Foo ;
99
10+ #[ warn( clippy:: const_static_lifetime) ]
11+ static Bar : & ' static str = "baz" ;
12+
1013impl Foo {
1114 fn new ( ) -> Self {
1215 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
2626LL | #[warn(clippy::new_without_default_derive)]
2727 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::new_without_default`
2828
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+
2935error: unknown lint: `stutter`
3036 --> $DIR/rename.rs:1:10
3137 |
@@ -38,5 +44,13 @@ error: lint `clippy::cyclomatic_complexity` has been renamed to `clippy::cogniti
3844LL | #![warn(clippy::cyclomatic_complexity)]
3945 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::cognitive_complexity`
4046
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
4256
You can’t perform that action at this time.
0 commit comments