Closed
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
_ => {}
}
}