]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/type-arg-mismatch-due-to-impl-trait.stderr
Rollup merge of #95504 - jyn514:library-alias, r=Mark-Simulacrum
[rust.git] / src / test / ui / impl-trait / type-arg-mismatch-due-to-impl-trait.stderr
1 error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0 type parameters
2   --> $DIR/type-arg-mismatch-due-to-impl-trait.rs:10:22
3    |
4 LL |     fn foo(&self, t: Self::T);
5    |           - expected 0 type parameters
6 ...
7 LL |     fn foo(&self, t: impl Clone) {}
8    |                      ^^^^^^^^^^
9    |                      |
10    |                      found 1 type parameter
11    |                      `impl Trait` introduces an implicit type parameter
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0049`.