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