2018-05-21 02:59:37 -05:00
|
|
|
error[E0643]: method `foo` has incompatible signature for trait
|
2019-12-15 14:08:06 -06:00
|
|
|
--> $DIR/impl-generic-mismatch.rs:13:12
|
2018-05-21 02:59:37 -05:00
|
|
|
|
|
|
|
|
LL | fn foo(&self, _: &impl Debug);
|
2018-05-21 11:06:28 -05:00
|
|
|
| ---------- declaration in trait here
|
2018-05-21 02:59:37 -05:00
|
|
|
...
|
|
|
|
LL | fn foo<U: Debug>(&self, _: &U) { }
|
2018-05-21 11:06:28 -05:00
|
|
|
| ^ expected `impl Trait`, found generic parameter
|
2019-10-24 00:20:58 -05:00
|
|
|
|
|
2018-05-21 11:06:28 -05:00
|
|
|
help: try removing the generic parameter and using `impl Trait` instead
|
|
|
|
|
|
|
|
|
LL | fn foo(&self, _: &impl Debug) { }
|
2018-05-23 20:31:54 -05:00
|
|
|
| -- ^^^^^^^^^^
|
2018-05-21 02:59:37 -05:00
|
|
|
|
|
|
|
error[E0643]: method `bar` has incompatible signature for trait
|
2019-12-15 14:08:06 -06:00
|
|
|
--> $DIR/impl-generic-mismatch.rs:22:23
|
2018-05-21 02:59:37 -05:00
|
|
|
|
|
|
|
|
LL | fn bar<U: Debug>(&self, _: &U);
|
2018-05-21 11:06:28 -05:00
|
|
|
| - declaration in trait here
|
2018-05-21 02:59:37 -05:00
|
|
|
...
|
|
|
|
LL | fn bar(&self, _: &impl Debug) { }
|
2018-05-21 11:06:28 -05:00
|
|
|
| ^^^^^^^^^^ expected generic parameter, found `impl Trait`
|
2019-10-24 00:20:58 -05:00
|
|
|
|
|
2018-05-21 11:06:28 -05:00
|
|
|
help: try changing the `impl Trait` argument to a generic parameter
|
|
|
|
|
|
2018-05-24 12:01:13 -05:00
|
|
|
LL | fn bar<U: Debug>(&self, _: &U) { }
|
|
|
|
| ^^^^^^^^^^ ^
|
2018-05-21 02:59:37 -05:00
|
|
|
|
|
|
|
error[E0643]: method `hash` has incompatible signature for trait
|
2019-12-15 14:08:06 -06:00
|
|
|
--> $DIR/impl-generic-mismatch.rs:33:33
|
2018-05-21 02:59:37 -05:00
|
|
|
|
|
|
|
|
LL | fn hash(&self, hasher: &mut impl Hasher) {}
|
2018-05-21 11:06:28 -05:00
|
|
|
| ^^^^^^^^^^^ expected generic parameter, found `impl Trait`
|
2018-05-21 02:59:37 -05:00
|
|
|
|
|
2018-08-21 05:57:11 -05:00
|
|
|
::: $SRC_DIR/libcore/hash/mod.rs:LL:COL
|
2018-05-21 02:59:37 -05:00
|
|
|
|
|
|
|
|
LL | fn hash<H: Hasher>(&self, state: &mut H);
|
2018-05-21 11:06:28 -05:00
|
|
|
| - declaration in trait here
|
2018-05-21 02:59:37 -05:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0643`.
|