Skip to content

Commit e578389

Browse files
committed
Auto merge of rust-lang#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 rust-lang#80527 merges, it will also be tested in rustdoc tests. AFAIK there is no way to test this with rustc directly.
2 parents 04df1c0 + 7a1e076 commit e578389

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

alloc/src/task.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ pub trait Wake {
3333
}
3434
}
3535

36-
#[allow(rustc::ineffective_unstable_trait_impl)]
36+
#[cfg_attr(bootstrap, allow(rustc::ineffective_unstable_trait_impl))]
37+
#[cfg_attr(not(bootstrap), allow(ineffective_unstable_trait_impl))]
3738
#[unstable(feature = "wake_trait", issue = "69912")]
3839
impl<W: Wake + Send + Sync + 'static> From<Arc<W>> for Waker {
3940
fn from(waker: Arc<W>) -> Waker {
@@ -43,7 +44,8 @@ impl<W: Wake + Send + Sync + 'static> From<Arc<W>> for Waker {
4344
}
4445
}
4546

46-
#[allow(rustc::ineffective_unstable_trait_impl)]
47+
#[cfg_attr(bootstrap, allow(rustc::ineffective_unstable_trait_impl))]
48+
#[cfg_attr(not(bootstrap), allow(ineffective_unstable_trait_impl))]
4749
#[unstable(feature = "wake_trait", issue = "69912")]
4850
impl<W: Wake + Send + Sync + 'static> From<Arc<W>> for RawWaker {
4951
fn from(waker: Arc<W>) -> RawWaker {

0 commit comments

Comments
 (0)