Description
When a crate B re-exports a type from another crate A under a different name in a private module, and defines a new type with the same name, and the type from the private module is re-exported in a public module using a wildcard, and the other type is also re-exported in that same public module, and a crate C re-exports this public module, the documentation page for that named type for crate C shows the wrong type when the documentation is compiled including dependencies.
Man, that's a mouthful. Here is some code to clarify:
// crate a
pub struct S {
pub crate_a: ()
}
// crate b
extern crate a;
mod private {
pub struct S {
pub crate_b: ()
}
pub use a::S as X;
}
pub mod public {
pub use private::*;
}
// crate c
extern crate b;
pub use b::public;
The documentation for c::public::S
shows the documentation for a::S
but the actual type is b::private::S
. There is no page for c::public::X
.
This shows up in the wild in the documentation for iron::headers::Cookie
, which is hyper::header::Cookie
but shows cookie::Cookie
.
I don't think this is one of the issues already documented in #24305