2021-07-17 18:13:50 +00:00
|
|
|
error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/derive-on-trait-item-or-impl-item.rs:2:5
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | #[derive(Clone)]
|
2021-07-17 18:13:50 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ not applicable here
|
|
|
|
LL |
|
|
|
|
LL | type Bar;
|
|
|
|
| --------- not a `struct`, `enum` or `union`
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2021-07-17 18:13:50 +00:00
|
|
|
error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
|
2018-12-27 00:07:00 +00:00
|
|
|
--> $DIR/derive-on-trait-item-or-impl-item.rs:10:5
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | #[derive(Clone)]
|
2021-07-17 18:13:50 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ not applicable here
|
|
|
|
LL |
|
|
|
|
LL | fn bar(&self) {}
|
|
|
|
| ---------------- not a `struct`, `enum` or `union`
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2018-12-27 00:07:00 +00:00
|
|
|
|
2020-09-05 12:55:15 +00:00
|
|
|
For more information about this error, try `rustc --explain E0774`.
|