Rust: [rustdoc] Private macros are not documented with `--document-private-items`

Created on 26 Jun 2020  路  3Comments  路  Source: rust-lang/rust

Rustdoc has --document-private-items and --document-hidden-items. It would be nice to have an option to document non-exported macros, which is currently not possible as far as I can tell.

A-macros C-bug E-medium P-medium T-rustdoc

Most helpful comment

I would expect --document-private-items to also document macros, so this seems like a bug

All 3 comments

I would expect --document-private-items to also document macros, so this seems like a bug

This is because rustdoc gets macros from Crate.exported_macros, which doesn't have the private macros in the first place. Intra-doc links don't have this problem because they look at Resolver::all_macros. Maybe the rest of rustdoc could use that too?

Marking as P-medium since this behavior is pretty confusing.

Was this page helpful?
0 / 5 - 0 ratings