Skip to content

Rustdoc-Json: Store number of fields for tuple struct #101489

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

Closed
aDotInTheVoid opened this issue Sep 6, 2022 · 0 comments · Fixed by #101521
Closed

Rustdoc-Json: Store number of fields for tuple struct #101489

aDotInTheVoid opened this issue Sep 6, 2022 · 0 comments · Fixed by #101521
Assignees
Labels
A-rustdoc-json Area: Rustdoc JSON backend T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@aDotInTheVoid
Copy link
Member

aDotInTheVoid commented Sep 6, 2022

In my mind what should happen to Struct is we put fields in StructType, eg

enum StructKind {
   Unit,
   Tuple(Vec<Option<Id>>),
   Normal {
       fields: Vec<Id>,
       fields_stripped: bool,
  },
}

That way we only show the position of #[doc(hidden)] in the tuple case where it's relevant.

If that sounds good I'll send a follow up PR

Originally posted by @aDotInTheVoid in #101462 (comment)

@rustbot claim

@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 Sep 6, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Sep 7, 2022
…illaumeGomez

Rustdoc-Json: More accurate struct type.

Closes rust-lang#101489

r? `@GuillaumeGomez`
@bors bors closed this as completed in 1c8de17 Sep 7, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants