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 shows a _DERIVE_..._FOR_... const when HashStable is derived #60150

Closed
bjorn3 opened this issue Apr 21, 2019 · 2 comments · Fixed by #60885
Closed

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

bjorn3 opened this issue Apr 21, 2019 · 2 comments · Fixed by #60885
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@bjorn3
Copy link
Member

bjorn3 commented Apr 21, 2019

Eg https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/constant._DERIVE_rustc_data_structures_stable_hasher_HashStable_rustc_ich_StableHashingContext_ctx_FOR_CastKind.html

List of all of these items in rustc::mir:

Screenshot_2019-04-21 rustc mir - Rust

@jonas-schievink jonas-schievink added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Apr 21, 2019
@euclio
Copy link
Contributor

euclio commented Apr 22, 2019

I'm working on this.

@euclio
Copy link
Contributor

euclio commented Apr 23, 2019

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.

Centril added a commit to Centril/rust that referenced this issue May 29, 2019
…=GuillaumeGomez

strip synstructure consts from compiler docs

Fixes rust-lang#60150.

Unfortunately this PR depends on the use of the deprecated `--passes` flag in bootstrap to keep the `--strip-hidden` pass while still documenting private items. I've opened rust-lang#60884 to track stabilization of a new flag that encapsulates this behavior.

r? @QuietMisdreavus
Centril added a commit to Centril/rust that referenced this issue May 29, 2019
…=GuillaumeGomez

strip synstructure consts from compiler docs

Fixes rust-lang#60150.

Unfortunately this PR depends on the use of the deprecated `--passes` flag in bootstrap to keep the `--strip-hidden` pass while still documenting private items. I've opened rust-lang#60884 to track stabilization of a new flag that encapsulates this behavior.

r? @QuietMisdreavus
oli-obk added a commit to oli-obk/rust that referenced this issue May 29, 2019
…=GuillaumeGomez

strip synstructure consts from compiler docs

Fixes rust-lang#60150.

Unfortunately this PR depends on the use of the deprecated `--passes` flag in bootstrap to keep the `--strip-hidden` pass while still documenting private items. I've opened rust-lang#60884 to track stabilization of a new flag that encapsulates this behavior.

r? @QuietMisdreavus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants