mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
21 lines
411 B
Rust
21 lines
411 B
Rust
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() {}
|