Skip to content

rustdoc only writes one file for multiple items exported as _ #80056

Closed
@CobaltCause

Description

@CobaltCause

For example, generating documentation for this code:

mod traits {
    pub trait TraitA {
        fn a();
    }
    pub trait TraitB {
        fn b();
    }
}

pub use traits::{TraitA as _, TraitB as _};

results in two traits named _, which is correct, but, no matter which one you click on, you'll only ever see the a() xor the b() function since rustdoc tries to write the documentation for both traits to the same file. At least, I think that's what's happening.

Meta

rustc --version --verbose:

rustc 1.48.0 (7eac88abb 2020-11-16)
binary: rustc
commit-hash: 7eac88abb2e57e752f3302f02be5f3ce3d7adfb4
commit-date: 2020-11-16
host: x86_64-unknown-linux-gnu
release: 1.48.0
LLVM version: 11.0

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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions