Skip to content

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

Closed
@sdroege

Description

@sdroege

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.regression-untriagedUntriaged performance or correctness regression.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions