1
Fork 0

fix grammar in useless doc comment lint

This commit is contained in:
Andy Russell 2022-06-30 16:17:38 -04:00
parent 7425fb293f
commit 625122af9f
No known key found for this signature in database
GPG key ID: BE2221033EDBC374
2 changed files with 3 additions and 3 deletions

View file

@ -1098,12 +1098,12 @@ impl EarlyLintPass for UnusedDocComment {
} }
fn check_block(&mut self, cx: &EarlyContext<'_>, block: &ast::Block) { fn check_block(&mut self, cx: &EarlyContext<'_>, block: &ast::Block) {
warn_if_doc(cx, block.span, "block", &block.attrs()); warn_if_doc(cx, block.span, "blocks", &block.attrs());
} }
fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) {
if let ast::ItemKind::ForeignMod(_) = item.kind { if let ast::ItemKind::ForeignMod(_) = item.kind {
warn_if_doc(cx, item.span, "extern block", &item.attrs); warn_if_doc(cx, item.span, "extern blocks", &item.attrs);
} }
} }
} }

View file

@ -71,7 +71,7 @@ LL |
LL | / extern "C" { LL | / extern "C" {
LL | | fn foo(); LL | | fn foo();
LL | | } LL | | }
| |_- rustdoc does not generate documentation for extern block | |_- rustdoc does not generate documentation for extern blocks
| |
= help: use `//` for a plain comment = help: use `//` for a plain comment