]>
Commit | Line | Data |
---|---|---|
7cac9316 XL |
1 | struct MyType; |
2 | struct MyType2; | |
3 | struct MyType3; | |
4 | struct MyType4; | |
5 | ||
6 | impl std::fmt::Display for MyType { | |
7 | fn fmt(&self, x: &str) -> () { } | |
ff7c6d11 | 8 | //~^ ERROR method `fmt` has an incompatible type |
7cac9316 XL |
9 | } |
10 | ||
11 | impl std::fmt::Display for MyType2 { | |
12 | fn fmt(&self) -> () { } | |
ff7c6d11 | 13 | //~^ ERROR method `fmt` has 1 parameter |
7cac9316 XL |
14 | } |
15 | ||
16 | impl std::fmt::Display for MyType3 { | |
17 | fn fmt() -> () { } | |
ff7c6d11 | 18 | //~^ ERROR method `fmt` has a `&self` declaration in the trait |
7cac9316 XL |
19 | } |
20 | ||
21 | impl std::fmt::Display for MyType4 {} | |
ff7c6d11 | 22 | //~^ ERROR not all trait items |
1a4d82fc | 23 | |
9e0c209e | 24 | fn main() {} |