@@ -27,8 +27,22 @@ help: try changing the `impl Trait` argument to a generic parameter
27
27
LL | fn bar<U: Debug>(&self, _: &U) { }
28
28
| ++++++++++ ~
29
29
30
+ error[E0643]: method `baz` has incompatible signature for trait
31
+ --> $DIR/impl-generic-mismatch.rs:26:33
32
+ |
33
+ LL | fn baz<U: Debug, T: Debug>(&self, _: &U, _: &T);
34
+ | - declaration in trait here
35
+ ...
36
+ LL | fn baz<T: Debug>(&self, _: &impl Debug, _: &T) { }
37
+ | ^^^^^^^^^^ expected generic parameter, found `impl Trait`
38
+ |
39
+ help: try changing the `impl Trait` argument to a generic parameter
40
+ |
41
+ LL | fn baz<U: Debug, T: Debug>(&self, _: &T, _: &T) { }
42
+ | ~~~~~~~~~~~~~~~~~~~~ ~
43
+
30
44
error[E0643]: method `hash` has incompatible signature for trait
31
- --> $DIR/impl-generic-mismatch.rs:28 :33
45
+ --> $DIR/impl-generic-mismatch.rs:37 :33
32
46
|
33
47
LL | fn hash(&self, hasher: &mut impl Hasher) {}
34
48
| ^^^^^^^^^^^ expected generic parameter, found `impl Trait`
@@ -38,6 +52,6 @@ LL | fn hash(&self, hasher: &mut impl Hasher) {}
38
52
LL | fn hash<H: Hasher>(&self, state: &mut H);
39
53
| - declaration in trait here
40
54
41
- error: aborting due to 3 previous errors
55
+ error: aborting due to 4 previous errors
42
56
43
57
For more information about this error, try `rustc --explain E0643`.
0 commit comments