rustdoc: highlight default enum variant #133174
Labels
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
T-rustdoc-frontend
Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Problem
It would be convenient and help readability if enum variants marked with
#[default]
in the code would be also marked as such in the documentation.While it is certainly possible to just use a doc comment, it would be better to have a standardized automatic solution.
Proposed Solution
Displaying
(default)
next to the default variant would be more than sufficient.Quick mockup of what it could look like:
Additionally, pre- or postfixing the variant with a symbol could also be a viable solution.
Notes
A similar issue was already created in the docs.rs repository but closed as it should have been opened here.
This would only apply to variant using the
#[default]
attribute; manualDefault
impls would clearly be out of scope (due to the insanity of parsing the behavior of such a function).The text was updated successfully, but these errors were encountered: