Skip to content

Rustdoc shows a _DERIVE_..._FOR_... const when HashStable is derived #60150

Activity

added
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
on Apr 21, 2019
euclio

euclio commented on Apr 22, 2019

@euclio
Contributor

I'm working on this.

euclio

euclio commented on Apr 23, 2019

@euclio
Contributor

So, this is trickier than I thought. The _DERIVE_ constants are an implementation detail of synstructure, which are used to ensure hygiene for the generated impls. They appear because we pass --document-private-items while generating the compiler docs.

I thought that I would be able to add #[doc(hidden)] to synstructure, but unfortunately the --document-private-items flag also removes the strip-hidden pass.

I suppose we have two options:

  1. Modify synstructure to add #[doc(hidden)] to the generated constants, and modify rustbuild to keep the strip-hidden pass when generating compiler docs.
  2. Wait until synstructure can achieve the same hygiene effect through a feature like underscore constants.
added 2 commits that reference this issue on May 29, 2019
4ca6a8f
781fe4c
added a commit that references this issue on May 29, 2019
e84c9f3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    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

      Participants

      @euclio@jonas-schievink@bjorn3

      Issue actions

        Rustdoc shows a _DERIVE_..._FOR_... const when HashStable is derived · Issue #60150 · rust-lang/rust