Closed
Description
This is a tracking issue for the RFC 3107.
The feature gate for the issue is #![feature(derive_default_enum)]
.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
- Implement the RFC — Implement RFC 3107:
#[derive(Default)]
on enums with a#[default]
attribute #86735 - Adjust documentation (see instructions on rustc-dev-guide)
- Stabilization PR (see instructions on rustc-dev-guide)
Unresolved Questions
- Should multiple
#[default]
attributes on the same variant be denied?
Implementation history
Initial implementation in #86735, which includes the feature gate and necessary errors.