2018-05-21 02:59:37 -05:00
|
|
|
error[E0643]: method `foo` has incompatible signature for trait
|
|
|
|
--> $DIR/impl-generic-mismatch.rs:18:12
|
|
|
|
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
--> $DIR/impl-generic-mismatch.rs:27:23
|
|
|
|
|
|
|
|
|
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`
|
|
|
|
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
|
|
|
|
--> $DIR/impl-generic-mismatch.rs:38:33
|
|
|
|
|
|
|
|
|
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`.
|