Extend unused_doc_comments lint to check on blocks
This commit is contained in:
parent
c42d846add
commit
ac891ea374
1 changed files with 10 additions and 0 deletions
|
@ -1086,6 +1086,16 @@ impl EarlyLintPass for UnusedDocComment {
|
|||
fn check_generic_param(&mut self, cx: &EarlyContext<'_>, param: &ast::GenericParam) {
|
||||
warn_if_doc(cx, param.ident.span, "generic parameters", ¶m.attrs);
|
||||
}
|
||||
|
||||
fn check_block(&mut self, cx: &EarlyContext<'_>, block: &ast::Block) {
|
||||
warn_if_doc(cx, block.span, "block", &block.attrs());
|
||||
}
|
||||
|
||||
fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) {
|
||||
if let ast::ItemKind::ForeignMod(_) = item.kind {
|
||||
warn_if_doc(cx, item.span, "extern block", &item.attrs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
declare_lint! {
|
||||
|
|
Loading…
Add table
Reference in a new issue