Skip to content

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

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

Closed
CobaltCause opened this issue Dec 15, 2020 · 1 comment
Closed

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

CobaltCause opened this issue Dec 15, 2020 · 1 comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@CobaltCause
Copy link

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
@CobaltCause CobaltCause added the C-bug Category: This is a bug. label Dec 15, 2020
@jonas-schievink jonas-schievink added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 15, 2020
@jyn514
Copy link
Member

jyn514 commented Dec 16, 2020

Duplicate of #61592

@jyn514 jyn514 marked this as a duplicate of #61592 Dec 16, 2020
@jyn514 jyn514 closed this as completed Dec 16, 2020
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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants