Skip to content

Clarify unused_doc_comments note on macro invocations #71412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/librustc_lint/context.rs
Original file line number Diff line number Diff line change
@@ -566,7 +566,7 @@ pub trait LintContext: Sized {
stability::deprecation_suggestion(&mut db, suggestion, span)
}
BuiltinLintDiagnostics::UnusedDocComment(span) => {
db.span_label(span, "rustdoc does not generate documentation for macros");
db.span_label(span, "rustdoc does not generate documentation for macro invocations");
db.help("to document an item produced by a macro, \
the macro must produce the documentation as part of its expansion");
}
4 changes: 2 additions & 2 deletions src/test/ui/useless-comment.stderr
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ error: unused doc comment
--> $DIR/useless-comment.rs:9:1
|
LL | /// foo
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rustdoc does not generate documentation for macros
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rustdoc does not generate documentation for macro invocations
|
note: the lint level is defined here
--> $DIR/useless-comment.rs:3:9
@@ -15,7 +15,7 @@ error: unused doc comment
--> $DIR/useless-comment.rs:32:5
|
LL | /// bar
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rustdoc does not generate documentation for macros
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rustdoc does not generate documentation for macro invocations
|
= help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion