about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/impl-trait/in-trait/deep-match.rs2
-rw-r--r--src/test/ui/impl-trait/in-trait/deep-match.stderr13
2 files changed, 5 insertions, 10 deletions
diff --git a/src/test/ui/impl-trait/in-trait/deep-match.rs b/src/test/ui/impl-trait/in-trait/deep-match.rs
index 5a220bc3f19..a6385147c3a 100644
--- a/src/test/ui/impl-trait/in-trait/deep-match.rs
+++ b/src/test/ui/impl-trait/in-trait/deep-match.rs
@@ -9,7 +9,7 @@ trait Foo {
 
 impl Foo for () {
     fn bar() -> i32 { 0 }
-    //~^ ERROR method `bar` has an incompatible type for trait
+    //~^ ERROR method `bar` has an incompatible return type for trait
 }
 
 fn main() {}
diff --git a/src/test/ui/impl-trait/in-trait/deep-match.stderr b/src/test/ui/impl-trait/in-trait/deep-match.stderr
index af449869cb3..034ee5ea4e1 100644
--- a/src/test/ui/impl-trait/in-trait/deep-match.stderr
+++ b/src/test/ui/impl-trait/in-trait/deep-match.stderr
@@ -1,19 +1,14 @@
-error[E0053]: method `bar` has an incompatible type for trait
+error[E0053]: method `bar` has an incompatible return type for trait
   --> $DIR/deep-match.rs:11:17
    |
 LL |     fn bar() -> i32 { 0 }
    |                 ^^^
    |                 |
    |                 expected struct `Wrapper`, found `i32`
-   |                 help: change the output type to match the trait: `Wrapper<_>`
+   |                 return type in trait
    |
-note: type in trait
-  --> $DIR/deep-match.rs:7:17
-   |
-LL |     fn bar() -> Wrapper<impl Sized>;
-   |                 ^^^^^^^^^^^^^^^^^^^
-   = note: expected fn pointer `fn() -> Wrapper<_>`
-              found fn pointer `fn() -> i32`
+   = note: expected struct `Wrapper<_>`
+                found type `i32`
 
 error: aborting due to previous error