1
Fork 0

suggest #[derive(Default)] to enums with #[default]

This commit is contained in:
Takayuki Maeda 2022-07-04 20:46:59 +09:00
parent 2557603f32
commit eb80407d79
3 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1,14 @@
error: cannot find attribute `default` in this scope
--> $DIR/suggest-default-attribute.rs:2:7
|
LL | #[default]
| ^^^^^^^
|
help: consider adding `#[derive(Default)]` to this enum
--> $DIR/suggest-default-attribute.rs:1:1
|
LL | pub enum Test {
| ^^^^^^^^^^^^^
error: aborting due to previous error