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

Remove struct_type from union output #81500

Merged
merged 1 commit into from
Feb 5, 2021
Merged

Conversation

CraftSpider
Copy link
Contributor

Also bumps the format number and adds a test

Rationale: It's illegal to have unions of the form union Union(i32, f32);, or union Union;. The struct_type field was recently removed from the rustdoc Union AST, at which time this field was changed to always just read "union". It makes sense to completely remove it, as it provides no information.

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 29, 2021
@CraftSpider
Copy link
Contributor Author

@rustbot modify labels: +A-rustdoc-json +T-rustdoc

@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jan 29, 2021
@Mark-Simulacrum
Copy link
Member

This seems reasonable to me, though I am worried about the requirement to keep track of the version number - do we have some kind of linting in place for that yet?

r? @jyn514

@CraftSpider
Copy link
Contributor Author

There's no automation around the format version as it stands. It might be smart to make it a constant in the types module, or something, as well as adding some lint or check. However, I'm not sure all that would entail.

@jyn514
Copy link
Member

jyn514 commented Feb 4, 2021

I agree it would be nice to have a tidy lint for bumping format_version, but it seems hard to tell the difference between a change that breaks semver and one that doesn't. Either way I don't think it needs to block this PR.

@bors r+

@bors
Copy link
Contributor

bors commented Feb 4, 2021

📌 Commit 3106de5 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-review Status: Awaiting review from the assignee but also interested parties. labels Feb 4, 2021
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Feb 5, 2021
Remove struct_type from union output

Also bumps the format number and adds a test

Rationale: It's illegal to have unions of the form `union Union(i32, f32);`, or `union Union;`. The struct_type field was recently removed from the rustdoc Union AST, at which time this field was changed to always just read "union". It makes sense to completely remove it, as it provides no information.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 5, 2021
Rollup of 15 pull requests

Successful merges:

 - rust-lang#79554 (Generic associated types in trait paths)
 - rust-lang#80726 (relax adt unsizing requirements)
 - rust-lang#81307 (Handle `Span`s for byte and raw strings and add more detail )
 - rust-lang#81318 (rustdoc-json: Fix has_body)
 - rust-lang#81456 (Make remote-test-server easier to use with new targets)
 - rust-lang#81497 (rustdoc: Move `display_fn` struct inside `display_fn`)
 - rust-lang#81500 (Remove struct_type from union output)
 - rust-lang#81542 (Expose correct symlink API on WASI)
 - rust-lang#81676 (Add more information to the error code for 'crate not found')
 - rust-lang#81682 (Add additional bitset benchmarks)
 - rust-lang#81730 (Make `Allocator` object-safe)
 - rust-lang#81763 (Cleanup rustdoc pass descriptions a bit)
 - rust-lang#81767 (Update LayoutError/LayoutErr stability attributes)
 - rust-lang#81771 (Indicate change in RSS from start to end of pass in time-passes output)
 - rust-lang#81781 (Fix `install-awscli.sh` error in CI)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e98e42b into rust-lang:master Feb 5, 2021
@rustbot rustbot added this to the 1.51.0 milestone Feb 5, 2021
@CraftSpider CraftSpider deleted the union-kind branch February 6, 2021 00:42
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 7, 2021
Add abi field to `Method`

Also bumps version and adds a test (Will conflict with rust-lang#81500, whichever is merged first)

Rationale: It's possible for methods to have an ABI. This should be exposed in the JSON.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 28, 2021
…omez

Fix the population of the `union.impls` field

This pull-request fix the population of the `union.impls` field that was forgot when the `Union` type was introduce as a split from the `Struct` type rust-lang#81500.

`@rustbot` label +T-rustdoc +A-rustdoc-json
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 28, 2021
…omez

Fix the population of the `union.impls` field

This pull-request fix the population of the `union.impls` field that was forgot when the `Union` type was introduce as a split from the `Struct` type rust-lang#81500.

``@rustbot`` label +T-rustdoc +A-rustdoc-json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend 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.

6 participants