Rustdoc-Json: Store Variant Fields as their own item.#101462
Merged
bors merged 1 commit intorust-lang:masterfrom Sep 6, 2022
Merged
Rustdoc-Json: Store Variant Fields as their own item.#101462bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
rustdoc-json-types is a public (although nightly-only) API. If possible, consider changing |
This comment has been minimized.
This comment has been minimized.
42483bd to
8821755
Compare
8821755 to
065e0b9
Compare
Member
|
I really like this approach. Just one comment: shouldn't we unify the |
Member
Author
|
In my mind what should happen to enum StructKind {
Unit,
Tuple(Vec<Option<Id>>),
Normal {
fields: Vec<Id>,
fields_stripped: bool,
},
}That way we only show the position of If that sounds good I'll send a follow up PR |
Member
|
This is a good argument indeed. Let's keep it this way then! |
GuillaumeGomez
approved these changes
Sep 6, 2022
Member
|
Thanks for the improvement (and the docs too!). @bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 6, 2022
…llaumeGomez Rollup of 7 pull requests Successful merges: - rust-lang#101357 (Include enum path in variant suggestion) - rust-lang#101434 (Update `SessionDiagnostic::into_diagnostic` to take `Handler` instead of `ParseSess`) - rust-lang#101445 (Suggest introducing an explicit lifetime if it does not exist) - rust-lang#101457 (Recover from using `;` as separator between fields) - rust-lang#101462 (Rustdoc-Json: Store Variant Fields as their own item.) - rust-lang#101471 (Report number of delayed bugs properly with `-Ztreat-err-as-bug`) - rust-lang#101473 (Add more size assertions for MIR types.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This was referenced Sep 7, 2022
aDotInTheVoid
added a commit
to rust-lang/rustdoc-types
that referenced
this pull request
Sep 7, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #100587
Closes #92945
Successor to #100762
Unlike that one, we don't have merge
StructTypeandVariant, as after #101386Variantstores enum specific information (discriminant).Resolves the naming discussion (#100762 (comment)) by having seperate enums for struct and enum kinds
Resolves
#[doc(hidden)]on tuple structs (#100762 (comment)) by storing as aVec<Option<Id>>r? @GuillaumeGomez