Whitelist doc attributes
This is a bit overly permissive but should be okay for now.
This commit is contained in:
parent
e0648093d8
commit
24f98c6d7a
@ -1147,6 +1147,9 @@ fn check_attrs_usage(cx: &Context, attrs: &[ast::Attribute]) {
|
||||
|
||||
fn check_unused_attribute(cx: &Context, attrs: &[ast::Attribute]) {
|
||||
for attr in attrs.iter() {
|
||||
// whitelist docs since rustdoc looks at them
|
||||
attr.check_name("doc");
|
||||
|
||||
if !attr::is_used(attr) {
|
||||
cx.span_lint(UnusedAttribute, attr.span, "unused attribute");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user