Closed
Description
Consider such code:
mod my_crate {
pub mod banana { // 1
pub struct Yellow;
}
pub mod peach { // 1
pub struct Pink;
}
}
pub use crate::my_crate::*;
pub mod banana { // 2
pub struct Brown;
}
pub mod peach { // 2
pub struct Pungent;
}
Due to how glob-import conflict resolution works (please correct me if I’m wrong @petrochenkov), when referring to the names banana
and peach
, only the banana//2
and peach//2
can be referred to.
rustdoc
will include both the modules into the output, repeated:
Moreover, both of the duplicated links actually refer to the same module index, so whether you end up seeing the correct module or the wrong one is a matter of luck(?). In my case all the modules render empty, suggesting the wrong module having been rendered.
The list of all items will (correctly) contain the Brown
and Pungent
structures, but not the unreachable Yellow
or Pink
ones: