You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Double reexport of non-public item is not listed as reexport #108679
pubmod a {mod b {pubstructB;}pubuse b::B;pubstructA;}pubuse a::{A,B};
When running cargo doc with the above code, the docs list the following items:
Docs
Crate foo
Re-exports
pub use a::A;
Modules
a
Structs
B
Module foo::a
Structs
A B
I would expect a::B to be listed as a reexport, not a struct. The way it is now, it looks like foo::B and foo::a::B are different types, which is not the case.
If a::b is made pub, everything looks as it's supposed to.
Activity
GuillaumeGomez commentedon Mar 3, 2023
It's the intended behaviour. Since the
bmodule is private,pub use b::Bis inlining the item intoa.Kyuuhachi commentedon Mar 3, 2023
Yes, but
crate::a::Bis public, so should it really be inlined a second time?GuillaumeGomez commentedon Mar 3, 2023
Ok sorry I misunderstood what you meant. No, it shouldn't be inlined a second time.
Rollup merge of rust-lang#108870 - GuillaumeGomez:rustdoc-reexport-of…