]> git.lizzy.rs Git - rust.git/blob - tests/ui/derives/issue-43023.rs
Auto merge of #107828 - compiler-errors:rollup-gyj6dgj, r=compiler-errors
[rust.git] / tests / ui / derives / issue-43023.rs
1 struct S;
2
3 impl S {
4     #[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
5     fn f() {
6         file!();
7     }
8 }
9
10 trait Tr1 {
11     #[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
12     fn f();
13 }
14
15 trait Tr2 {
16     #[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
17     type F;
18 }
19
20 fn main() {}