Register rename to the LintStore.
This commit is contained in:
parent
55740219b0
commit
fefa7e7f67
@ -1153,6 +1153,7 @@ pub fn register_renamed(ls: &mut rustc::lint::LintStore) {
|
||||
ls.register_renamed("clippy::stutter", "clippy::module_name_repetitions");
|
||||
ls.register_renamed("clippy::new_without_default_derive", "clippy::new_without_default");
|
||||
ls.register_renamed("clippy::cyclomatic_complexity", "clippy::cognitive_complexity");
|
||||
ls.register_renamed("clippy::const_static_lifetime", "clippy::redundant_static_lifetimes");
|
||||
}
|
||||
|
||||
// only exists to let the dogfood integration test works.
|
||||
|
@ -7,6 +7,9 @@ fn main() {}
|
||||
#[warn(clippy::new_without_default_derive)]
|
||||
struct Foo;
|
||||
|
||||
#[warn(clippy::const_static_lifetime)]
|
||||
static Bar: &'static str = "baz";
|
||||
|
||||
impl Foo {
|
||||
fn new() -> Self {
|
||||
Foo
|
||||
|
@ -26,6 +26,12 @@ error: lint `clippy::new_without_default_derive` has been renamed to `clippy::ne
|
||||
LL | #[warn(clippy::new_without_default_derive)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::new_without_default`
|
||||
|
||||
error: lint `clippy::const_static_lifetime` has been renamed to `clippy::redundant_static_lifetimes`
|
||||
--> $DIR/rename.rs:10:8
|
||||
|
|
||||
LL | #[warn(clippy::const_static_lifetime)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::redundant_static_lifetimes`
|
||||
|
||||
error: unknown lint: `stutter`
|
||||
--> $DIR/rename.rs:1:10
|
||||
|
|
||||
@ -38,5 +44,13 @@ error: lint `clippy::cyclomatic_complexity` has been renamed to `clippy::cogniti
|
||||
LL | #![warn(clippy::cyclomatic_complexity)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::cognitive_complexity`
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
error: Statics have by default a `'static` lifetime
|
||||
--> $DIR/rename.rs:11:14
|
||||
|
|
||||
LL | static Bar: &'static str = "baz";
|
||||
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
||||
|
|
||||
= note: `-D clippy::redundant-static-lifetimes` implied by `-D warnings`
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user