Skip to content
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

Rustc doesn't emit unused_doc_comments warning for documentation on generic parameters #90610

Closed
jyn514 opened this issue Nov 5, 2021 · 0 comments · Fixed by #91397
Closed
Assignees
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jyn514
Copy link
Member

jyn514 commented Nov 5, 2021

I tried this code:

pub fn foo<#[doc = "bar"] A>(_baz: A) {}

I expected to see this happen: Either rustdoc adds "bar" somewhere in the documentation, or rustc gives a warning that the doc-comment does nothing.

Instead, this happened: The doc-comment is silently discarded.

Meta

rustc --version --verbose: rustc 1.58.0-nightly (4961b10 2021-11-04)

@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Nov 5, 2021
@camelid camelid changed the title Rustc doesn't emit missing_doc warning for documentation on generic parameters Rustc doesn't emit unused_doc_comment warning for documentation on generic parameters Nov 7, 2021
@camelid camelid changed the title Rustc doesn't emit unused_doc_comment warning for documentation on generic parameters Rustc doesn't emit unused_doc_comments warning for documentation on generic parameters Nov 7, 2021
@jyn514 jyn514 added the E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. label Nov 30, 2021
@jyn514 jyn514 self-assigned this Nov 30, 2021
@bors bors closed this as completed in 7baafb1 Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant