suggest adding a derive for #[default] applied to variants
This commit is contained in:
parent
8824d13161
commit
2f0ccdfbba
3 changed files with 15 additions and 9 deletions
|
@ -4,11 +4,11 @@ error: cannot find attribute `default` in this scope
|
|||
LL | #[default]
|
||||
| ^^^^^^^
|
||||
|
|
||||
help: consider adding `#[derive(Default)]` to this enum
|
||||
--> $DIR/suggest-default-attribute.rs:1:1
|
||||
help: consider adding a derive
|
||||
|
|
||||
LL + #[derive(Default)]
|
||||
LL ~ pub enum Test {
|
||||
|
|
||||
LL | pub enum Test {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue