Closed
Description
I'm trying to work on #83375, but found a related but not same bug:
I run rustdoc
on this code:
// resolve.rs
pub mod sub {
pub struct Item;
/// sub::prelude
pub mod prelude {
pub use super::Item;
pub fn describe() -> &'static str {
"sub::prelude"
}
}
}
pub mod sub2 {
pub struct Item;
/// sub2::prelude
pub mod prelude {
pub use super::Item;
pub fn describe() -> &'static str {
"sub2::prelude"
}
}
}
#[doc(inline)]
pub use sub::*;
#[doc(inline)]
pub use sub2::prelude;
I expected to see this happen:
Only one prelude
link exists and it resolves to sub2::prelude
(if you do println!("{}", resolve::prelude::describe());
, you'll get the output sub2::prelude
)
Instead, this happened:
- Similiar with Rustdoc: glob reexport may duplicate module #83375 described, there are two
preludes
here:
- Moreover, if you visit either of the
prelude
links, it direct you tosub::prelude
Meta
rustdoc +local --version
:
rustdoc 1.53.0-dev
Backtrace
NA