]> git.lizzy.rs Git - rust.git/blob - src/test/ui/derives/derive-on-trait-item-or-impl-item.rs
Merge commit 'e214ea82ad0a751563acf67e1cd9279cf302db3a' into clippyup
[rust.git] / src / test / ui / derives / derive-on-trait-item-or-impl-item.rs
1 trait Foo {
2     #[derive(Clone)]
3     //~^ ERROR `derive` may only be applied to structs, enums and unions
4     type Bar;
5 }
6
7 struct Bar;
8
9 impl Bar {
10     #[derive(Clone)]
11     //~^ ERROR `derive` may only be applied to structs, enums and unions
12     fn bar(&self) {}
13 }
14
15 fn main() {}