rustdoc: How to render struct variants with no visible fields? #118195
Labels
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
While working on #118192, I noticed that struct variants with no (visible) fields look kinda awkward.
The Fields heading takes a lot of space without adding particularly much to the content. The easiest solution would be to just remove the heading, but that would show no indication that there exist private fields. The same issue exists in top-level structs as well, but there it is mitigated by having the definition in the code block just above, while for enums there can be a sizeable distance between the two.
Any thoughts? Am I just overthinking the whole thing?
The text was updated successfully, but these errors were encountered: