rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
99.06k stars 12.8k forks source link

Cross-crate import chain misses docs from middle crate #120927

Open dhardy opened 9 months ago

dhardy commented 9 months ago

Given crates a:

/// (doc in a)
pub fn foo() {}

b:

/// (doc in b)
#[doc(inline)]
pub use a::foo;

and c:

/// (doc in master crate)
#[doc(inline)]
pub use b::foo;

The resulting rustdoc output for c omits documentation added in b: image I would expect the docs from all crates to be included.

Source for reproduction

inline-doc-reexport.zip

Related

84619

89020

@rustbot label +A-cross-crate-reexports +T-rustdoc

dhardy commented 9 months ago

This also applies to re-exports via

#[doc(inline)]
pub extern crate b;