Open
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