#[default] without #[derive(Default)] could suggest adding #[derive(Default)] #95226
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: https://gist.github.com/cbe5d4fb00ed34650d2873725eefbc67
The current output is:
Ideally the output should suggest adding a
#[derive(Default)]
attribute to the enum. Bonus points if it detects an existingderive
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.The text was updated successfully, but these errors were encountered: