]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/trait_type.rs
Rollup merge of #98441 - calebzulawski:simd_as, r=oli-obk
[rust.git] / src / test / ui / impl-trait / trait_type.rs
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) -> () { }
8    //~^ ERROR method `fmt` has an incompatible type
9 }
10
11 impl std::fmt::Display for MyType2 {
12    fn fmt(&self) -> () { }
13    //~^ ERROR method `fmt` has 1 parameter
14 }
15
16 impl std::fmt::Display for MyType3 {
17    fn fmt() -> () { }
18    //~^ ERROR method `fmt` has a `&self` declaration in the trait
19 }
20
21 impl std::fmt::Display for MyType4 {}
22 //~^ ERROR not all trait items
23
24 fn main() {}