Closed
Description
I tried this code:
struct Ty {}
/// Documentation 1
impl Ty {}
I expected to see this happen: Either the comment should show up in the generated docs, or rustdoc/rustc should issue a warning.
Instead, this happened: The documentation is silently ignored.
I think we should show the documentation, since people like to use impl blocks for grouping and it's possible that all the items in the impl have a #[cfg()]
macro that's false.
Thanks @WaffleLapkin for the bug report and @GuillaumeGomez for giving feedback on the proper fix.
Meta
rustdoc --version --verbose
: rustdoc 1.58.0-nightly (e90c5fb 2021-11-12)