rustdoc-json: Inconsistant Enum Representation #93667
Labels
A-rustdoc-json
Area: Rustdoc JSON backend
C-discussion
Category: Discussion or questions that doesn't represent real issues.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Currently we use 3 different ways to serialse enums to json:
rust/src/rustdoc-json-types/lib.rs
Lines 372 to 423 in 71226d7
Which ends up looking like
rust/src/rustdoc-json-types/lib.rs
Lines 322 to 334 in 71226d7
Which gives output that looks like
Item
/ItemEnum
, which are their own special weird, because of Remove Item::kind, use tagged enum. Rename variants to match #82613.Its basicly Ajacenctly tagged, but the tag/content are inlined to the Item
I'm not sure how much it matters which one we pick as almost all users will be going through the rust types, but it would be good to be consistant. I have no prefernce between 1 and 2, but 3 seems weird, so I dont think we should do that.
cc @CraftSpider
@rustbot modify labels: +C-discussion +A-rustdoc-json +T-rustdoc
but I think 3 is bad
The text was updated successfully, but these errors were encountered: