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

Hidden items in external crate are made public when inline glob re-exported #53417

Closed
SergioBenitez opened this issue Aug 16, 2018 · 4 comments · Fixed by #112304
Closed

Hidden items in external crate are made public when inline glob re-exported #53417

SergioBenitez opened this issue Aug 16, 2018 · 4 comments · Fixed by #112304
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

@SergioBenitez
Copy link
Contributor

SergioBenitez commented Aug 16, 2018

Consider a crate parent with the following items:

mod module;

#[doc(hidden)]
pub use module::Hidden;
pub use module::Visible;

where module.rs contains:

pub enum Hidden {  }
pub enum Visible {  }

Now consider a crate foo that inline, glob-exports parent in a module par:

extern crate parent;

pub mod par {
    #[doc(inline)]
    pub use parent::*;
}

The item Hidden is rendered in the rustdocs for foo::par when it shouldn't be.

To work around this issue, #[doc(hidden)] can be applied to the Hidden item in module.rs:

#[doc(hidden)]
pub enum Hidden {  }
pub enum Visible {  }

This workaround only works when #[doc(hidden)] is applied to the source definition.

cc @QuietMisdreavus

@QuietMisdreavus QuietMisdreavus added C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 28, 2018
@QuietMisdreavus
Copy link
Member

I just used this sample with the latest nightly (rustdoc 1.30.0-nightly (20dc0c507 2018-09-19)) and it didn't seem to show the Hidden struct? Can you confirm that this is still an issue?

@SergioBenitez
Copy link
Contributor Author

SergioBenitez commented Sep 20, 2018

This is still an issue. I've updated the description with a complete, working example, as well as a workaround that points to the root of the issue (#[doc(hidden)] being ignored on the re-export in parent).

@SergioBenitez
Copy link
Contributor Author

SergioBenitez commented Aug 16, 2020

As a matter of update: this is unfortunately still an issue.

@GuillaumeGomez
Copy link
Member

Should be fixed by #109697.

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
3 participants