2017-09-21 07:20:56 +00:00
|
|
|
struct S;
|
|
|
|
|
|
|
|
impl S {
|
2021-07-17 18:13:50 +00:00
|
|
|
#[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
|
2017-09-21 07:20:56 +00:00
|
|
|
fn f() {
|
|
|
|
file!();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
trait Tr1 {
|
2021-07-17 18:13:50 +00:00
|
|
|
#[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
|
2017-09-21 07:20:56 +00:00
|
|
|
fn f();
|
|
|
|
}
|
|
|
|
|
|
|
|
trait Tr2 {
|
2021-07-17 18:13:50 +00:00
|
|
|
#[derive(Debug)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
|
2017-09-21 07:20:56 +00:00
|
|
|
type F;
|
|
|
|
}
|
2018-12-16 17:23:27 +00:00
|
|
|
|
|
|
|
fn main() {}
|