Description
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; manual Default
impls would clearly be out of scope (due to the insanity of parsing the behavior of such a function).