-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
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-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
The unused-attribute lint currently globally whitelists all doc attributes as used, even if they're placed in contexts that rustdoc would never look at (e.g. match arms). There should be a separate pass over the AST that marks the attributes in the correct contexts.
#![warn(unused_attributes)]
fn f() {
match 10 {
/// test
_ => {}
}
}
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-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.