Skip to content

rustdoc: how does #[doc(hidden)] interact with --document-private-items? #46380

Closed
@hdevalence

Description

@hdevalence

I have types Public (which is exported) and Private (which isn't) and an impl Add<Private> for Public. I would like the impl Add<Private> for Public to appear in the Rustdoc output only when using --document-private-items.

As far as I can tell, the impl Add<Private> for Public appears in the normal rustdoc output unless it has a #[doc(hidden)] attribute. But this prevents the impl from appearing with --document-private-items.

Is --document-private-items supposed to override #[doc(hidden)]? Is there another way to hide impl Add<Private> for Public from the public rustdoc output?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.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