fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0643]: method `foo` has incompatible signature for trait 2 --> $DIR/impl-generic-mismatch.rs:8:12 3 | 4LL | fn foo(&self, _: &impl Debug); 5 | ---------- declaration in trait here 6... 7LL | fn foo<U: Debug>(&self, _: &U) { } 8 | ^ expected `impl Trait`, found generic parameter 9 | 10help: try removing the generic parameter and using `impl Trait` instead 11 | 12LL - fn foo<U: Debug>(&self, _: &U) { } 13LL + fn foo(&self, _: &impl Debug) { } 14 | 15 16error[E0643]: method `bar` has incompatible signature for trait 17 --> $DIR/impl-generic-mismatch.rs:17:23 18 | 19LL | fn bar<U: Debug>(&self, _: &U); 20 | - declaration in trait here 21... 22LL | fn bar(&self, _: &impl Debug) { } 23 | ^^^^^^^^^^ expected generic parameter, found `impl Trait` 24 | 25help: try changing the `impl Trait` argument to a generic parameter 26 | 27LL | fn bar<U: Debug>(&self, _: &U) { } 28 | ++++++++++ ~ 29 30error[E0643]: method `baz` has incompatible signature for trait 31 --> $DIR/impl-generic-mismatch.rs:26:33 32 | 33LL | fn baz<U: Debug, T: Debug>(&self, _: &U, _: &T); 34 | - declaration in trait here 35... 36LL | fn baz<T: Debug>(&self, _: &impl Debug, _: &T) { } 37 | ^^^^^^^^^^ expected generic parameter, found `impl Trait` 38 | 39help: try changing the `impl Trait` argument to a generic parameter 40 | 41LL | fn baz<U: Debug, T: Debug>(&self, _: &T, _: &T) { } 42 | ~~~~~~~~~~~~~~~~~~~~ ~ 43 44error[E0643]: method `hash` has incompatible signature for trait 45 --> $DIR/impl-generic-mismatch.rs:37:33 46 | 47LL | fn hash(&self, hasher: &mut impl Hasher) {} 48 | ^^^^^^^^^^^ expected generic parameter, found `impl Trait` 49 --> $SRC_DIR/core/src/hash/mod.rs:LL:COL 50 | 51 = note: declaration in trait here 52 53error: aborting due to 4 previous errors 54 55For more information about this error, try `rustc --explain E0643`.