1
Fork 0

suggest adding a derive for #[default] applied to variants

This commit is contained in:
Deadbeef 2022-07-07 04:57:01 +00:00
parent 8824d13161
commit 2f0ccdfbba
3 changed files with 15 additions and 9 deletions

View file

@ -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