summaryrefslogtreecommitdiffstats
path: root/tests/ui/derives/issue-43023.rs
blob: c0208e680841eec256346603280c756516055d05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
struct S;

impl S {
    #[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
    fn f() {
        file!();
    }
}

trait Tr1 {
    #[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
    fn f();
}

trait Tr2 {
    #[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
    type F;
}

fn main() {}