about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorOliver Schneider <github35764891676564198441@oli-obk.de>2018-05-21 09:59:37 +0200
committerOliver Schneider <github35764891676564198441@oli-obk.de>2018-05-21 09:59:37 +0200
commit00842d10cd703263833132867d59c85b343eb202 (patch)
tree13136e4f0b7efeca72e733e0c203c8c91a2b797c /src
parent0874ba0fe57e792fc21f835be33fbccc7f576787 (diff)
Move a test to ui tests so we can observe the output changes better
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/impl-trait/impl-generic-mismatch.rs (renamed from src/test/compile-fail/impl-trait/impl-generic-mismatch.rs)0
-rw-r--r--src/test/ui/impl-trait/impl-generic-mismatch.stderr32
2 files changed, 32 insertions, 0 deletions
diff --git a/src/test/compile-fail/impl-trait/impl-generic-mismatch.rs b/src/test/ui/impl-trait/impl-generic-mismatch.rs
index d6707f59011..d6707f59011 100644
--- a/src/test/compile-fail/impl-trait/impl-generic-mismatch.rs
+++ b/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 00000000000..ef66e9803aa
--- /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<U: Debug>(&self, _: &U) { }
+   |            ^ annotation in impl
+
+error[E0643]: method `bar` has incompatible signature for trait
+  --> $DIR/impl-generic-mismatch.rs:27:23
+   |
+LL |     fn bar<U: Debug>(&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<H: Hasher>(&self, state: &mut H);
+   |             - annotation in trait
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0643`.