Clarify unused_doc_comments note on macro invocations

This commit is contained in:
David Tolnay 2020-04-21 21:09:24 -07:00
parent 70f4f320b0
commit 3a8097f2b4
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 3 additions and 3 deletions

View File

@ -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");
}

View File

@ -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