-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.F-lint_reasons`#![feature(lint_reasons)]``#![feature(lint_reasons)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
At some point between rustc
nightly-2023-03-05
(works) and nightly-2023-07-01
(does not work) the following stopped compiling:
#![deny(warnings)]
struct X;
impl X {
#[expect(unused)]
fn unused();
// This is failing with `warning: this lint expectation is unfulfilled`.
// Only the first `#[expect(unused)]` in an impl block works as expected.
#[expect(unused)]
fn unused2();
}
fn main() {
let _ = X;
}
RUSTFLAGS="-D warnings" cargo check
I have not bisected for the exact commit that broke this.
I have only tried to reproduce this error using #[expect(unused)]
. It's possible that this is also broken for other lints.
PR: #114417
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.F-lint_reasons`#![feature(lint_reasons)]``#![feature(lint_reasons)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.