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

Add support for tuple struct field documentation #87451

Merged
merged 5 commits into from
Jul 29, 2021

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Jul 25, 2021

Fixes #42615.
This is #80320 updated to new codebase and with added tests.
Part of #83255.

cc @camelid (since you were involved on the original PR).
r? @jyn514

@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jul 25, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 25, 2021
@jyn514
Copy link
Member

jyn514 commented Jul 25, 2021

This closes #42615, right? I'm not sure how the --show-coverage issue is related.

@jyn514 jyn514 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 25, 2021
@GuillaumeGomez
Copy link
Member Author

This closes #42615, right? I'm not sure how the --show-coverage issue is related.

Absolutely! As for the --show-coverage issue: it's because it complains about missing documentation on tuple structs' fields which currently can't be documented. ;)

@GuillaumeGomez
Copy link
Member Author

Added support for tuple structs in enums as well. Great catch @jyn514 !

@rust-log-analyzer

This comment has been minimized.

src/librustdoc/clean/mod.rs Outdated Show resolved Hide resolved
src/librustdoc/clean/mod.rs Outdated Show resolved Hide resolved
src/librustdoc/clean/types.rs Outdated Show resolved Hide resolved
src/librustdoc/html/render/print_item.rs Outdated Show resolved Hide resolved
src/librustdoc/html/render/print_item.rs Outdated Show resolved Hide resolved
@GuillaumeGomez
Copy link
Member Author

Updated!

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

And of course I forgot rustfmt...

@jyn514
Copy link
Member

jyn514 commented Jul 27, 2021

r=me with the comment added :)

@GuillaumeGomez
Copy link
Member Author

@bors: r=jyn514

@bors
Copy link
Contributor

bors commented Jul 27, 2021

📌 Commit c4aa735 has been approved by jyn514

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 27, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 27, 2021
…oc, r=jyn514

Add support for tuple struct field documentation

Fixes  rust-lang#42615.
This is rust-lang#80320 updated to new codebase and with added tests.
Part of rust-lang#83255.

cc `@camelid` (since you were involved on the original PR).
r? `@jyn514`
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jul 28, 2021
…oc, r=jyn514

Add support for tuple struct field documentation

Fixes  rust-lang#42615.
This is rust-lang#80320 updated to new codebase and with added tests.
Part of rust-lang#83255.

cc ``@camelid`` (since you were involved on the original PR).
r? ``@jyn514``
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 28, 2021
Rollup of 10 pull requests

Successful merges:

 - rust-lang#81050 (Stabilize core::task::ready!)
 - rust-lang#81363 (Remove P: Unpin bound on impl Future for Pin)
 - rust-lang#86839 (Add doc aliases to fs.rs)
 - rust-lang#87435 (fix example code for E0617)
 - rust-lang#87451 (Add support for tuple struct field documentation)
 - rust-lang#87491 (Integrate context into the memorial to Anna)
 - rust-lang#87521 (Add long explanation for E0498)
 - rust-lang#87527 (Don't run MIR unsafeck at all when using `-Zthir-unsafeck`)
 - rust-lang#87550 (Add `CI_ONLY_WHEN_CHANNEL` and run `x86_64-gnu-stable` only on nightly)
 - rust-lang#87565 (Use backticks when referring to `core::future::Ready` in panic message)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 014e22c into rust-lang:master Jul 29, 2021
@rustbot rustbot added this to the 1.56.0 milestone Jul 29, 2021
@GuillaumeGomez GuillaumeGomez deleted the tuple-struct-field-doc branch July 29, 2021 08:14
@jyn514 jyn514 added the relnotes Marks issues that should be documented in the release notes of the next release. label Jul 30, 2021
// (even for a tuple struct variant!), it's simpler to just store it as a
// `Variant::Struct` instead of a `Variant::Tuple` (otherwise it would force us to make
// a lot of changes when rendering them to generate the name as well).
hir::VariantData::Tuple(..) => Variant::Struct(self.clean(cx)),
Copy link

@dsherret dsherret Aug 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this cause #87887?

It seems like tuple variants no longer exist in the outputted json, but shouldn't tuple variants be described as tuple variants?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's very likely yes.

Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 24, 2021
…lbini

Add 1.56.0 release notes

Notable things:

* Rustdoc section currently absent, for lack of things to call out that I could find. It seems like rust-lang#87451 is the only potential candidate, but that seems like more of a bugfix and doesn't seem to warrant inclusion to me. But we can add it if desired.

As with the 1.55.0 release notes, my intent is to leave this open for approximately 1-2 weeks at the early part of the cycle, and then merge it in (after fixing any feedback). Further iteration can happen in subsequent issues (and PRs).

[Rendered](https://github.com/Mark-Simulacrum/rust/blob/relnotes/RELEASES.md)
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Sep 24, 2021
…lbini

Add 1.56.0 release notes

Notable things:

* Rustdoc section currently absent, for lack of things to call out that I could find. It seems like rust-lang#87451 is the only potential candidate, but that seems like more of a bugfix and doesn't seem to warrant inclusion to me. But we can add it if desired.

As with the 1.55.0 release notes, my intent is to leave this open for approximately 1-2 weeks at the early part of the cycle, and then merge it in (after fixing any feedback). Further iteration can happen in subsequent issues (and PRs).

[Rendered](https://github.com/Mark-Simulacrum/rust/blob/relnotes/RELEASES.md)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rustdoc should pick up docs for tuple struct and enum fields
8 participants