]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/type-arg-mismatch-due-to-impl-trait.rs
Rollup merge of #98441 - calebzulawski:simd_as, r=oli-obk
[rust.git] / src / test / ui / impl-trait / type-arg-mismatch-due-to-impl-trait.rs
1 trait Foo {
2     type T;
3     fn foo(&self, t: Self::T);
4 //~^ NOTE expected 0 type parameters
5 }
6
7 impl Foo for u32 {
8     type T = ();
9
10     fn foo(&self, t: impl Clone) {}
11 //~^ ERROR method `foo` has 1 type parameter but its trait declaration has 0 type parameters
12 //~| NOTE found 1 type parameter
13 //~| NOTE `impl Trait` introduces an implicit type parameter
14 }
15
16 fn main() {}