-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Move unused_doc_comment lint to a later pass to after proc macro expansion #67838
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I'm currently writing a crate where I'd like to use doc comments as attributes for a proc macro that generates context directives for errors and log messages via
tracing.https://github.com/yaahc/spandoc/blob/master/src/lib.rs
I had originally assumed that if my proc macro stripped out the doc attribute after converting it to a span then the compiler would not lint on the doc comments that actually got used as code, but when I tested this it still lints which implies to me that the unused doc comment lint happens in an earlier pass than proc-macro expansion does.
I'd like to be able to avoid using
#[allow(unused_doc_comments)]on either the whole function or file because I want the lints to help me find doc comments that I add, expecting them to turn into spans, but which my proc macro does not handle and therefore leaves in as doc comments.