-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Open
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)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-bugCategory: This is a bug.Category: This is a bug.L-unused_doc_commentsLint: unused_doc_commentsLint: unused_doc_commentsP-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
The lint unused_doc_comments triggers on any #[doc …] / #![doc …] (on any token stream inside the attribute) when it should only trigger on actual documentation comments i.e. #[doc = …] / #![doc = …].
E.g. the following code incorrectly labels #[doc(hidden)] as a doc comment:
fn f<#[doc(hidden)] T>() {}warning: unused doc comment
--> q.rs:1:6
|
1 | fn f<#[doc(hidden)] T>() {}
| ^^^^^^^^^^^^^^ - rustdoc does not generate documentation for generic parameters
|
= note: `#[warn(unused_doc_comments)]` on by default
= help: use `//` for a plain comment
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)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-bugCategory: This is a bug.Category: This is a bug.L-unused_doc_commentsLint: unused_doc_commentsLint: unused_doc_commentsP-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.