-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rustdoc-Json: Store Variant Fields as their own item. #101462
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
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
I really like this approach. Just one comment: shouldn't we unify the |
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 |
This is a good argument indeed. Let's keep it this way then! |
Thanks for the improvement (and the docs too!). @bors r+ rollup |
…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
Closes #100587
Closes #92945
Successor to #100762
Unlike that one, we don't have merge
StructType
andVariant
, as after #101386Variant
stores 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