Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc doesn't show traits re-exported as _ #108931

Closed
sdroege opened this issue Mar 9, 2023 · 0 comments · Fixed by #108936
Closed

rustdoc doesn't show traits re-exported as _ #108931

sdroege opened this issue Mar 9, 2023 · 0 comments · Fixed by #108936
Labels
C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@sdroege
Copy link
Contributor

sdroege commented Mar 9, 2023

I tried this code:

mod my_mod {
    pub trait Foo {}
}

pub mod prelude {
    pub use super::my_mod::Foo as _;
}

I expected to see this happen: rustdoc shows that the prelude re-exports

Instead, this happened: rustdoc shows the module as empty

This is a regression from #97617, which explicitly implements the above behaviour (CC @GuillaumeGomez). This makes it hard to figure out from the documentation which kinds of traits importing a prelude-style module would bring into scope unless the prelude re-exports them with an actual name. Re-exporting with an actual name is not necessary for extension traits though.

Meta

rustc --version --verbose:

rustc 1.69.0-nightly (001a77fac 2023-01-30)
binary: rustc
commit-hash: 001a77fac33f6560ff361ff38f661ff5f1c6bf85
commit-date: 2023-01-30
host: x86_64-unknown-linux-gnu
release: 1.69.0-nightly
LLVM version: 15.0.7

@rustbot modify labels: regression-untriaged

@sdroege sdroege added the C-bug Category: This is a bug. label Mar 9, 2023
@rustbot rustbot added regression-untriaged Untriaged performance or correctness regression. I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Mar 9, 2023
@apiraino apiraino added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Mar 9, 2023
@bors bors closed this as completed in 6ef07c2 Mar 10, 2023
@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants