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