diff --git a/src/test/compile-fail/impl-trait/impl-generic-mismatch.rs b/src/test/ui/impl-trait/impl-generic-mismatch.rs similarity index 100% rename from src/test/compile-fail/impl-trait/impl-generic-mismatch.rs rename to src/test/ui/impl-trait/impl-generic-mismatch.rs diff --git a/src/test/ui/impl-trait/impl-generic-mismatch.stderr b/src/test/ui/impl-trait/impl-generic-mismatch.stderr new file mode 100644 index 000000000000..ef66e9803aa7 --- /dev/null +++ b/src/test/ui/impl-trait/impl-generic-mismatch.stderr @@ -0,0 +1,32 @@ +error[E0643]: method `foo` has incompatible signature for trait + --> $DIR/impl-generic-mismatch.rs:18:12 + | +LL | fn foo(&self, _: &impl Debug); + | ---------- annotation in trait +... +LL | fn foo(&self, _: &U) { } + | ^ annotation in impl + +error[E0643]: method `bar` has incompatible signature for trait + --> $DIR/impl-generic-mismatch.rs:27:23 + | +LL | fn bar(&self, _: &U); + | - annotation in trait +... +LL | fn bar(&self, _: &impl Debug) { } + | ^^^^^^^^^^ annotation in impl + +error[E0643]: method `hash` has incompatible signature for trait + --> $DIR/impl-generic-mismatch.rs:38:33 + | +LL | fn hash(&self, hasher: &mut impl Hasher) {} + | ^^^^^^^^^^^ annotation in impl + | + ::: /home/oliver/Projects/rust/rust3/src/libcore/hash/mod.rs:185:13 + | +LL | fn hash(&self, state: &mut H); + | - annotation in trait + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0643`.