]> git.lizzy.rs Git - rust.git/blob - tests/ui/derives/derive-on-trait-item-or-impl-item.rs
Rollup merge of #106717 - klensy:typo, r=lcnr
[rust.git] / tests / ui / derives / derive-on-trait-item-or-impl-item.rs
1 trait Foo {
2     #[derive(Clone)]
3     //~^ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
4     type Bar;
5 }
6
7 struct Bar;
8
9 impl Bar {
10     #[derive(Clone)]
11     //~^ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
12     fn bar(&self) {}
13 }
14
15 fn main() {}