Closed

Description
Code:
#[macro_use]
pub mod my_module {
/// This is a simple macro.
#[macro_export]
#[doc(hidden)]
macro_rules! foo {
() => ();
}
/// This doc comment doesn't show up in rustdoc (there's just an ugly re-export).
pub use crate::foo as bar;
// And this re-export doesn't show up in rustdoc at all!
#[doc(inline)]
pub use crate::foo as baz;
}
Generated docs:
So what I want to do is create a macro inside my_module
. I don't want it to show up in crate root - I want it only in this module.
Both of the re-exports above work just fine. However, in the generated docs, one of them has no docs and the other doesn't show up at all.
I'm surprised that #[doc(hidden)]
is "recursive" - shouldn't it only hide foo
and not hide baz
? Is this a bug?
Versions:
$ rustc --version
rustc 1.35.0-nightly (94fd04589 2019-03-21)
$ cargo --version
cargo 1.35.0-nightly (0e35bd8af 2019-03-13)
$ rustdoc --version
rustdoc 1.35.0-nightly (94fd04589 2019-03-21)