Skip to content

Commit 528202f

Browse files
authored
Rollup merge of #98739 - euclio:useless-comment-plural, r=Dylan-DPC
fix grammar in useless doc comment lint
2 parents 90b296d + 625122a commit 528202f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/rustc_lint/src/builtin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1098,12 +1098,12 @@ impl EarlyLintPass for UnusedDocComment {
10981098
}
10991099

11001100
fn check_block(&mut self, cx: &EarlyContext<'_>, block: &ast::Block) {
1101-
warn_if_doc(cx, block.span, "block", &block.attrs());
1101+
warn_if_doc(cx, block.span, "blocks", &block.attrs());
11021102
}
11031103

11041104
fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) {
11051105
if let ast::ItemKind::ForeignMod(_) = item.kind {
1106-
warn_if_doc(cx, item.span, "extern block", &item.attrs);
1106+
warn_if_doc(cx, item.span, "extern blocks", &item.attrs);
11071107
}
11081108
}
11091109
}

src/test/ui/lint/unused/unused-doc-comments-edge-cases.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ LL |
7171
LL | / extern "C" {
7272
LL | | fn foo();
7373
LL | | }
74-
| |_- rustdoc does not generate documentation for extern block
74+
| |_- rustdoc does not generate documentation for extern blocks
7575
|
7676
= help: use `//` for a plain comment
7777

0 commit comments

Comments
 (0)