2017-12-26 16:47:32 +09:00
|
|
|
trait Foo {
|
|
|
|
|
#[derive(Clone)]
|
2021-07-17 11:13:50 -07:00
|
|
|
//~^ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
|
2017-12-26 16:47:32 +09:00
|
|
|
type Bar;
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-16 20:23:27 +03:00
|
|
|
struct Bar;
|
|
|
|
|
|
2017-12-26 16:47:32 +09:00
|
|
|
impl Bar {
|
|
|
|
|
#[derive(Clone)]
|
2021-07-17 11:13:50 -07:00
|
|
|
//~^ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
|
2017-12-26 16:47:32 +09:00
|
|
|
fn bar(&self) {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|