-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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-json: Add test for field ordering. #110435
Conversation
61c7b1e
to
9139cf1
Compare
I suppose it needs to be checked for unions and enum struct variants as well? |
9139cf1
to
3242b4f
Compare
This looks great! If you're open to adding one more thing, it would be great to assert that the order of variants in an enum is preserved as well. There are some sneaky non-obvious semver hazards there:
|
c0e0f4d
to
006903e
Compare
Sorry, I missed this one. Don't hesitate to ping me if approval is taking too long. ^^' Thanks! @bors r+ rollup |
…r=GuillaumeGomez rustdoc-json: Add test for field ordering. Inspired by [this on twitter](https://twitter.com/PredragGruevski/status/1647705616650043392), the ordering of fields really matters, so we should test we preserve it through json. r? rustdoc
Looks like this failed in #114627 (comment) ? |
006903e
to
52a4e3b
Compare
r=me once CI pass |
This comment has been minimized.
This comment has been minimized.
52a4e3b
to
31ddea6
Compare
@bors r=GuillaumeGomez |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#110435 (rustdoc-json: Add test for field ordering.) - rust-lang#111891 (feat: `riscv-interrupt-{m,s}` calling conventions) - rust-lang#114377 (test_get_dbpath_for_term(): handle non-utf8 paths (fix FIXME)) - rust-lang#114469 (Detect method not found on arbitrary self type with different mutability) - rust-lang#114587 (Convert Const to Allocation in smir) - rust-lang#114670 (Don't use `type_of` to determine if item has intrinsic shim) Failed merges: - rust-lang#114599 (Add impl trait declarations to SMIR) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#110435 (rustdoc-json: Add test for field ordering.) - rust-lang#111891 (feat: `riscv-interrupt-{m,s}` calling conventions) - rust-lang#114377 (test_get_dbpath_for_term(): handle non-utf8 paths (fix FIXME)) - rust-lang#114469 (Detect method not found on arbitrary self type with different mutability) - rust-lang#114587 (Convert Const to Allocation in smir) - rust-lang#114670 (Don't use `type_of` to determine if item has intrinsic shim) Failed merges: - rust-lang#114599 (Add impl trait declarations to SMIR) r? `@ghost` `@rustbot` modify labels: rollup
Inspired by this on twitter, the ordering of fields really matters, so we should test we preserve it through json.
r? rustdoc