diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-07-01 20:19:19 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-01 20:19:19 +0530 |
| commit | 528202fec24453131a09f304412688d3673285aa (patch) | |
| tree | 1ec76fa30081c175482884f84b81824b091fb0eb | |
| parent | 90b296d770d98cc5311fa2642b66d5e9a8503aff (diff) | |
| parent | 625122af9f4825f79bae7cbac55acc8fcbcda3eb (diff) | |
| download | rust-528202fec24453131a09f304412688d3673285aa.tar.gz rust-528202fec24453131a09f304412688d3673285aa.zip | |
Rollup merge of #98739 - euclio:useless-comment-plural, r=Dylan-DPC
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 |
