about summary refs log tree commit diff
path: root/tests/ui/impl-trait
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/impl-trait')
-rw-r--r--tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr22
-rw-r--r--tests/ui/impl-trait/in-trait/deep-match.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/default-body-type-err-2.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/default-body-type-err.stderr2
-rw-r--r--tests/ui/impl-trait/issue-102605.stderr2
-rw-r--r--tests/ui/impl-trait/issue-99914.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-74282.stderr4
-rw-r--r--tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr4
-rw-r--r--tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr4
-rw-r--r--tests/ui/impl-trait/universal-mismatched-type.stderr2
10 files changed, 23 insertions, 23 deletions
diff --git a/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr
index 7f73d5e12d1..f64ba3bf1c4 100644
--- a/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr
+++ b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/dyn-trait-return-should-be-impl-trait.rs:7:35
    |
 LL | fn fuz() -> (usize, Trait) { (42, Struct) }
-   |                                   ^^^^^^ expected trait object `dyn Trait`, found struct `Struct`
+   |                                   ^^^^^^ expected `dyn Trait`, found `Struct`
    |
    = note: expected trait object `(dyn Trait + 'static)`
                     found struct `Struct`
@@ -23,7 +23,7 @@ error[E0308]: mismatched types
   --> $DIR/dyn-trait-return-should-be-impl-trait.rs:10:39
    |
 LL | fn bar() -> (usize, dyn Trait) { (42, Struct) }
-   |                                       ^^^^^^ expected trait object `dyn Trait`, found struct `Struct`
+   |                                       ^^^^^^ expected `dyn Trait`, found `Struct`
    |
    = note: expected trait object `(dyn Trait + 'static)`
                     found struct `Struct`
@@ -110,7 +110,7 @@ LL | |         Struct
    | |         ------ expected because of this
 LL | |     } else {
 LL | |         42
-   | |         ^^ expected struct `Struct`, found integer
+   | |         ^^ expected `Struct`, found integer
 LL | |     }
    | |_____- `if` and `else` have incompatible types
 
@@ -144,7 +144,7 @@ LL | fn bam() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
 LL |     if true {
 LL |         return Struct;
-   |                ^^^^^^ expected struct `Box`, found struct `Struct`
+   |                ^^^^^^ expected `Box<dyn Trait>`, found `Struct`
    |
    = note: expected struct `Box<(dyn Trait + 'static)>`
               found struct `Struct`
@@ -161,7 +161,7 @@ LL | fn bam() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
 ...
 LL |     42
-   |     ^^ expected struct `Box`, found integer
+   |     ^^ expected `Box<dyn Trait>`, found integer
    |
    = note: expected struct `Box<(dyn Trait + 'static)>`
                 found type `{integer}`
@@ -178,7 +178,7 @@ LL | fn baq() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
 LL |     if true {
 LL |         return 0;
-   |                ^ expected struct `Box`, found integer
+   |                ^ expected `Box<dyn Trait>`, found integer
    |
    = note: expected struct `Box<(dyn Trait + 'static)>`
                 found type `{integer}`
@@ -195,7 +195,7 @@ LL | fn baq() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
 ...
 LL |     42
-   |     ^^ expected struct `Box`, found integer
+   |     ^^ expected `Box<dyn Trait>`, found integer
    |
    = note: expected struct `Box<(dyn Trait + 'static)>`
                 found type `{integer}`
@@ -212,7 +212,7 @@ LL | fn baz() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
 LL |     if true {
 LL |         Struct
-   |         ^^^^^^ expected struct `Box`, found struct `Struct`
+   |         ^^^^^^ expected `Box<dyn Trait>`, found `Struct`
    |
    = note: expected struct `Box<(dyn Trait + 'static)>`
               found struct `Struct`
@@ -229,7 +229,7 @@ LL | fn baz() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
 ...
 LL |         42
-   |         ^^ expected struct `Box`, found integer
+   |         ^^ expected `Box<dyn Trait>`, found integer
    |
    = note: expected struct `Box<(dyn Trait + 'static)>`
                 found type `{integer}`
@@ -246,7 +246,7 @@ LL | fn baw() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
 LL |     if true {
 LL |         0
-   |         ^ expected struct `Box`, found integer
+   |         ^ expected `Box<dyn Trait>`, found integer
    |
    = note: expected struct `Box<(dyn Trait + 'static)>`
                 found type `{integer}`
@@ -263,7 +263,7 @@ LL | fn baw() -> Box<dyn Trait> {
    |             -------------- expected `Box<(dyn Trait + 'static)>` because of return type
 ...
 LL |         42
-   |         ^^ expected struct `Box`, found integer
+   |         ^^ expected `Box<dyn Trait>`, found integer
    |
    = note: expected struct `Box<(dyn Trait + 'static)>`
                 found type `{integer}`
diff --git a/tests/ui/impl-trait/in-trait/deep-match.stderr b/tests/ui/impl-trait/in-trait/deep-match.stderr
index 034ee5ea4e1..3eba419c0a3 100644
--- a/tests/ui/impl-trait/in-trait/deep-match.stderr
+++ b/tests/ui/impl-trait/in-trait/deep-match.stderr
@@ -4,7 +4,7 @@ error[E0053]: method `bar` has an incompatible return type for trait
 LL |     fn bar() -> i32 { 0 }
    |                 ^^^
    |                 |
-   |                 expected struct `Wrapper`, found `i32`
+   |                 expected `Wrapper<_>`, found `i32`
    |                 return type in trait
    |
    = note: expected struct `Wrapper<_>`
diff --git a/tests/ui/impl-trait/in-trait/default-body-type-err-2.stderr b/tests/ui/impl-trait/in-trait/default-body-type-err-2.stderr
index 142b1bff1a4..cc3bdf0e571 100644
--- a/tests/ui/impl-trait/in-trait/default-body-type-err-2.stderr
+++ b/tests/ui/impl-trait/in-trait/default-body-type-err-2.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL |         42
    |         ^^- help: try using a conversion method: `.to_string()`
    |         |
-   |         expected struct `String`, found integer
+   |         expected `String`, found integer
 
 error: aborting due to previous error
 
diff --git a/tests/ui/impl-trait/in-trait/default-body-type-err.stderr b/tests/ui/impl-trait/in-trait/default-body-type-err.stderr
index 461247a3e3f..4742eb37d3e 100644
--- a/tests/ui/impl-trait/in-trait/default-body-type-err.stderr
+++ b/tests/ui/impl-trait/in-trait/default-body-type-err.stderr
@@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `<&i32 as Deref>::Target == String`
   --> $DIR/default-body-type-err.rs:7:22
    |
 LL |     fn lol(&self) -> impl Deref<Target = String> {
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `String`
+   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `String`
 LL |
 LL |         &1i32
    |         ----- return type was inferred to be `&i32` here
diff --git a/tests/ui/impl-trait/issue-102605.stderr b/tests/ui/impl-trait/issue-102605.stderr
index d4aba914908..6cf0c33ad91 100644
--- a/tests/ui/impl-trait/issue-102605.stderr
+++ b/tests/ui/impl-trait/issue-102605.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-102605.rs:13:20
    |
 LL |     convert_result(foo())
-   |     -------------- ^^^^^ expected enum `Result`, found opaque type
+   |     -------------- ^^^^^ expected `Result<(), _>`, found opaque type
    |     |
    |     arguments to this function are incorrect
    |
diff --git a/tests/ui/impl-trait/issue-99914.stderr b/tests/ui/impl-trait/issue-99914.stderr
index 074d5d58d9a..3b4e130fdeb 100644
--- a/tests/ui/impl-trait/issue-99914.stderr
+++ b/tests/ui/impl-trait/issue-99914.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-99914.rs:9:27
    |
 LL |     t.and_then(|t| -> _ { bar(t) });
-   |                           ^^^^^^ expected enum `Result`, found opaque type
+   |                           ^^^^^^ expected `Result<_, Error>`, found opaque type
    |
 note: while checking the return type of the `async fn`
   --> $DIR/issue-99914.rs:13:23
diff --git a/tests/ui/impl-trait/issues/issue-74282.stderr b/tests/ui/impl-trait/issues/issue-74282.stderr
index 5b05fb2810d..724f3c5d674 100644
--- a/tests/ui/impl-trait/issues/issue-74282.stderr
+++ b/tests/ui/impl-trait/issues/issue-74282.stderr
@@ -10,7 +10,7 @@ LL |       Anonymous(|| {
    | |     arguments to this struct are incorrect
 LL | |         3
 LL | |     })
-   | |_____^ expected closure, found a different closure
+   | |_____^ expected opaque type, found closure
    |
    = note: expected opaque type `Closure`
                   found closure `[closure@$DIR/issue-74282.rs:8:15: 8:17]`
@@ -33,7 +33,7 @@ LL | |         3
 LL | |     })
    | |      ^- help: consider using a semicolon here: `;`
    | |______|
-   |        expected `()`, found struct `Anonymous`
+   |        expected `()`, found `Anonymous`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr b/tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr
index d6f5a1ac25b..e5147bcea16 100644
--- a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr
+++ b/tests/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr
@@ -5,7 +5,7 @@ LL | fn can() -> impl NotObjectSafe {
    |             ------------------ expected `A` because of return type
 ...
 LL |     B
-   |     ^ expected struct `A`, found struct `B`
+   |     ^ expected `A`, found `B`
 
 error[E0308]: mismatched types
   --> $DIR/object-unsafe-trait-in-return-position-impl-trait.rs:43:5
@@ -14,7 +14,7 @@ LL | fn cat() -> impl ObjectSafe {
    |             --------------- expected `A` because of return type
 ...
 LL |     B
-   |     ^ expected struct `A`, found struct `B`
+   |     ^ expected `A`, found `B`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr
index c7c6ca44012..f7aff419544 100644
--- a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr
+++ b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr
@@ -15,7 +15,7 @@ LL |     type Foo = impl PartialEq<(Foo, i32)>;
 LL |         fn eq(&self, _other: &(Foo, i32)) -> bool {
    |                              ^^^^^^^^^^^
    |                              |
-   |                              expected struct `Bar`, found opaque type
+   |                              expected `a::Bar`, found opaque type
    |                              help: change the parameter type to match the trait: `&(a::Bar, i32)`
    |
    = note: expected signature `fn(&a::Bar, &(a::Bar, i32)) -> _`
@@ -38,7 +38,7 @@ LL |     type Foo = impl PartialEq<(Foo, i32)>;
 LL |         fn eq(&self, _other: &(Bar, i32)) -> bool {
    |                              ^^^^^^^^^^^
    |                              |
-   |                              expected opaque type, found struct `Bar`
+   |                              expected opaque type, found `b::Bar`
    |                              help: change the parameter type to match the trait: `&(b::Foo, i32)`
    |
    = note: expected signature `fn(&b::Bar, &(b::Foo, i32)) -> _`
diff --git a/tests/ui/impl-trait/universal-mismatched-type.stderr b/tests/ui/impl-trait/universal-mismatched-type.stderr
index 817c573c091..a56e542d834 100644
--- a/tests/ui/impl-trait/universal-mismatched-type.stderr
+++ b/tests/ui/impl-trait/universal-mismatched-type.stderr
@@ -6,7 +6,7 @@ LL | fn foo(x: impl Debug) -> String {
    |           |
    |           this type parameter
 LL |     x
-   |     ^ expected struct `String`, found type parameter `impl Debug`
+   |     ^ expected `String`, found type parameter `impl Debug`
    |
    = note:      expected struct `String`
            found type parameter `impl Debug`