diff options
| author | Andy Russell <arussell123@gmail.com> | 2022-06-30 16:17:38 -0400 |
|---|---|---|
| committer | Andy Russell <arussell123@gmail.com> | 2022-06-30 16:17:38 -0400 |
| commit | 625122af9f4825f79bae7cbac55acc8fcbcda3eb (patch) | |
| tree | 6f5a4105956b731884c72e6b187cbac6baf6cfa2 | |
| parent | 7425fb293f510a6f138e82a963a3bc599a5b9e1c (diff) | |
| download | rust-625122af9f4825f79bae7cbac55acc8fcbcda3eb.tar.gz rust-625122af9f4825f79bae7cbac55acc8fcbcda3eb.zip | |
fix grammar in useless doc comment lint
| -rw-r--r-- | compiler/rustc_lint/src/builtin.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/lint/unused/unused-doc-comments-edge-cases.stderr | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 8266f1566c4..c0cf8c6b76b 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -1098,12 +1098,12 @@ impl EarlyLintPass for UnusedDocComment { } 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) { 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); } } } diff --git a/src/test/ui/lint/unused/unused-doc-comments-edge-cases.stderr b/src/test/ui/lint/unused/unused-doc-comments-edge-cases.stderr index 30a96af583a..1a022c30938 100644 --- a/src/test/ui/lint/unused/unused-doc-comments-edge-cases.stderr +++ b/src/test/ui/lint/unused/unused-doc-comments-edge-cases.stderr @@ -71,7 +71,7 @@ LL | LL | / extern "C" { LL | | fn foo(); LL | | } - | |_- rustdoc does not generate documentation for extern block + | |_- rustdoc does not generate documentation for extern blocks | = help: use `//` for a plain comment |
