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 `hash` has incompatible signature for trait
31 --> $DIR/impl-generic-mismatch.rs:28:33
33 LL | fn hash(&self, hasher: &mut impl Hasher) {}
34 | ^^^^^^^^^^^ expected generic parameter, found `impl Trait`
36 ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL
38 LL | fn hash<H: Hasher>(&self, state: &mut H);
39 | - declaration in trait here
41 error: aborting due to 3 previous errors
43 For more information about this error, try `rustc --explain E0643`.