1 error[E0643]: method `foo` has incompatible signature for trait
2 --> $DIR/impl-generic-mismatch.rs:8:12
4 LL | fn foo(&self, _: &impl Debug);
5 | ---------- declaration in trait here
7 LL | fn foo<U: Debug>(&self, _: &U) { }
8 | ^ expected `impl Trait`, found generic parameter
10 help: try removing the generic parameter and using `impl Trait` instead
12 LL - fn foo<U: Debug>(&self, _: &U) { }
13 LL + fn foo(&self, _: &impl Debug) { }
16 error[E0643]: method `bar` has incompatible signature for trait
17 --> $DIR/impl-generic-mismatch.rs:17:23
19 LL | fn bar<U: Debug>(&self, _: &U);
20 | - declaration in trait here
22 LL | fn bar(&self, _: &impl Debug) { }
23 | ^^^^^^^^^^ expected generic parameter, found `impl Trait`
25 help: try changing the `impl Trait` argument to a generic parameter
27 LL | fn bar<U: Debug>(&self, _: &U) { }
30 error[E0643]: method `baz` has incompatible signature for trait
31 --> $DIR/impl-generic-mismatch.rs:26:33
33 LL | fn baz<U: Debug, T: Debug>(&self, _: &U, _: &T);
34 | - declaration in trait here
36 LL | fn baz<T: Debug>(&self, _: &impl Debug, _: &T) { }
37 | ^^^^^^^^^^ expected generic parameter, found `impl Trait`
39 help: try changing the `impl Trait` argument to a generic parameter
41 LL | fn baz<U: Debug, T: Debug>(&self, _: &T, _: &T) { }
42 | ~~~~~~~~~~~~~~~~~~~~ ~
44 error[E0643]: method `hash` has incompatible signature for trait
45 --> $DIR/impl-generic-mismatch.rs:37:33
47 LL | fn hash(&self, hasher: &mut impl Hasher) {}
48 | ^^^^^^^^^^^ expected generic parameter, found `impl Trait`
50 ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL
52 LL | fn hash<H: Hasher>(&self, state: &mut H);
53 | - declaration in trait here
55 error: aborting due to 4 previous errors
57 For more information about this error, try `rustc --explain E0643`.