diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 8266f1566c423..c0cf8c6b76b78 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 30a96af583af7..1a022c30938f2 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