-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
steveklabnik commentedon Apr 30, 2015
Triage: no change that I'm aware of.
steveklabnik commentedon Jun 27, 2016
Triage: same as last year
Havvy commentedon Jun 30, 2018
Triage: There's a new lint
unused_doc_comments
that triggers in these cases. IMO, this is good enough to close the issue as fixed. cc @QuietMisdreavus for confirmation.QuietMisdreavus commentedon Jul 5, 2018
@Havvy When/where was this lint added? I'm not familiar with it.
euclio commentedon Nov 28, 2018
Added in #43009, where this case is specifically tested.
Mark-Simulacrum commentedon Aug 17, 2019
Closing as per the above, looks like this was implemented in the unused_doc_comments lint.
Auto merge of rust-lang#14408 - Veykril:intern-block, r=Veykril
Make `borrow_as_ptr` flag implicit casts as well (rust-lang#14408)