Closed
Description
Given the following code: https://gist.github.com/cbe5d4fb00ed34650d2873725eefbc67
pub enum Test {
#[default]
First,
Second,
}
The current output is:
error: cannot find attribute `default` in this scope
--> src/lib.rs:2:7
|
2 | #[default]
| ^^^^^^^
Ideally the output should suggest adding a #[derive(Default)]
attribute to the enum. Bonus points if it detects an existing derive
attribute and merely adds to the list, rather than adding a new attribute.
Note that this depends on the derive_default_enum
feature, which will soon be stabilised as of the FCP in #87517.