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)
I tried this code:
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)