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: Duplicated trait entries if re-exported from multiple modules #43934

Closed
sdroege opened this issue Aug 17, 2017 · 2 comments
Closed

rustdoc: Duplicated trait entries if re-exported from multiple modules #43934

sdroege opened this issue Aug 17, 2017 · 2 comments
Labels
C-bug Category: This is a bug. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@sdroege
Copy link
Contributor

sdroege commented Aug 17, 2017

If you generate the docs of
https://github.com/sdroege/gstreamer-rs/tree/50a1535771d711b419eee499fb6b7c48d72edd86
there will be multiple entries linking to the same traits on the main page of the docs.

Reason here is that the traits are re-exported in lib.rs from auto::* and auto::traits::*. Removing the latter fixes it and has no negative side effects in this specific case, but having the entries there twice was confusing nonetheless.

@GuillaumeGomez

@GuillaumeGomez
Copy link
Member

Fixing it.

@GuillaumeGomez
Copy link
Member

An easy code to reproduce this error:

mod foo {
    pub use bar::*;
    pub mod bar {
        pub trait Foo {
            fn foo();
        }
    }
}

pub use foo::bar::*;
pub use foo::*;

@Mark-Simulacrum Mark-Simulacrum added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. labels Aug 20, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this issue Aug 26, 2017
…isdreavus

Remove duplicates in rustdoc

Fixes rust-lang#43934.

Two things however:

 1. I'm not happy with the current check. It seems completely overkill and unsatisfying.
 2. I have no idea how to test if there is only one element and not two.

r? @rust-lang/docs
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-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. 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