-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
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:
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.