Auto merge of #80524 - jyn514:unknown-tool-lints, r=flip1995,matthewjasper
Don't make tools responsible for checking unknown and renamed lints Previously, clippy (and any other tool emitting lints) had to have their own separate UNKNOWN_LINTS pass, because the compiler assumed any tool lint could be valid. Now, as long as any lint starting with the tool prefix exists, the compiler will warn when an unknown lint is present. This may interact with the unstable `tool_lint` feature, which I don't entirely understand, but it will take the burden off those external tools to add their own lint pass, which seems like a step in the right direction to me. - Don't mark `ineffective_unstable_trait_impl` as an internal lint - Use clippy's more advanced lint suggestions - Deprecate the `UNKNOWN_CLIPPY_LINTS` pass (and make it a no-op) - Say 'unknown lint `clippy::x`' instead of 'unknown lint x' This is tested by existing clippy tests. When https://github.com/rust-lang/rust/pull/80527 merges, it will also be tested in rustdoc tests. AFAIK there is no way to test this with rustc directly.
This commit is contained in:
commit
1f0fc02cc8
12 changed files with 116 additions and 112 deletions
|
|
@ -22,7 +22,7 @@ impl StableTrait for UnstableType {}
|
|||
impl UnstableTrait for StableType {}
|
||||
|
||||
#[unstable(feature = "x", issue = "none")]
|
||||
//~^ ERROR an `#[unstable]` annotation here has no effect [rustc::ineffective_unstable_trait_impl]
|
||||
//~^ ERROR an `#[unstable]` annotation here has no effect [ineffective_unstable_trait_impl]
|
||||
impl StableTrait for StableType {}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ error: an `#[unstable]` annotation here has no effect
|
|||
LL | #[unstable(feature = "x", issue = "none")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[deny(rustc::ineffective_unstable_trait_impl)]` on by default
|
||||
= note: `#[deny(ineffective_unstable_trait_impl)]` on by default
|
||||
= note: see issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue