Closed
Description
Currently rustdoc will inline docs when an otherwise private item is reexported publically inside a crate, e.g.
// krate.rs
pub mod foo {
pub use bar::Baz;
mod bar { /** Docs! */ pub struct Baz; }
}
will show the docs for Baz
at krate::foo::Baz
, as if Baz
was defined directly in foo
.
It would also be useful to be able to request this behaviour manually, e.g.
// krate.rs
extern crate foo;
#[doc(inline)]
pub use foo::secret::Bar;
would show the docs for foo::secret::Bar
at krate::Bar
, as if Bar
was defined in krate
.
This is useful when re-exporting something from another crate, when your crate is meant to be the stable interface.