-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Private fields in aliased type should not be shown #124938
Labels
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
C-bug
Category: This is a bug.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Comments
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
May 9, 2024
Urgau
changed the title
Private items in aliased type should not be shown
Private fields in aliased type should not be shown
May 9, 2024
rustbot
added
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
May 9, 2024
Dupe of #123860 and more discussion there |
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
May 11, 2024
…type, r=GuillaumeGomez Always hide private fields in aliased type This PR adds a new rustdoc pass that unconditionally always strips all private fields in aliased type, since showing them, even with `--document-private-items`, is confusing, unhelpful, and run backwards to the "Aliased type" feature, which is to show the type as it would be seen by the user. r? `@GuillaumeGomez` Fixes rust-lang#124938 Fixes rust-lang#123860
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
May 11, 2024
…type, r=GuillaumeGomez Always hide private fields in aliased type This PR adds a new rustdoc pass that unconditionally always strips all private fields in aliased type, since showing them, even with `--document-private-items`, is confusing, unhelpful, and run backwards to the "Aliased type" feature, which is to show the type as it would be seen by the user. r? ``@GuillaumeGomez`` Fixes rust-lang#124938 Fixes rust-lang#123860
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
May 12, 2024
Rollup merge of rust-lang#124939 - Urgau:hide-private-fields-aliased-type, r=GuillaumeGomez Always hide private fields in aliased type This PR adds a new rustdoc pass that unconditionally always strips all private fields in aliased type, since showing them, even with `--document-private-items`, is confusing, unhelpful, and run backwards to the "Aliased type" feature, which is to show the type as it would be seen by the user. r? ```@GuillaumeGomez``` Fixes rust-lang#124938 Fixes rust-lang#123860
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
C-bug
Category: This is a bug.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
I tried this code:
with
rustdoc
and--document-private-items
.I expected to see this happen: No internal fields of the
BTreeMap
should be displayed as users won't be able to use the fields, making their appearance confusing and useless.Instead, this happened: The internal fields of the
BTreeMap
are displayedReal impact as can be seen here.
Meta
rustdoc --version --verbose
:The text was updated successfully, but these errors were encountered: