about summary refs log tree commit diff
path: root/tests/ui/async-await/in-trait
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/in-trait')
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.current.stderr17
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.next.stderr17
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-boxed.current.stderr11
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-boxed.next.stderr11
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-manual.current.stderr11
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-manual.next.stderr11
-rw-r--r--tests/ui/async-await/in-trait/async-generics-and-bounds.current.stderr37
-rw-r--r--tests/ui/async-await/in-trait/async-generics-and-bounds.next.stderr37
-rw-r--r--tests/ui/async-await/in-trait/async-generics.current.stderr37
-rw-r--r--tests/ui/async-await/in-trait/async-generics.next.stderr37
-rw-r--r--tests/ui/async-await/in-trait/async-recursive-generic.current.stderr12
-rw-r--r--tests/ui/async-await/in-trait/async-recursive-generic.next.stderr12
-rw-r--r--tests/ui/async-await/in-trait/async-recursive.current.stderr12
-rw-r--r--tests/ui/async-await/in-trait/async-recursive.next.stderr12
-rw-r--r--tests/ui/async-await/in-trait/bad-signatures.current.stderr17
-rw-r--r--tests/ui/async-await/in-trait/bad-signatures.next.stderr17
-rw-r--r--tests/ui/async-await/in-trait/dont-project-to-specializable-projection.current.stderr10
-rw-r--r--tests/ui/async-await/in-trait/dont-project-to-specializable-projection.next.stderr25
-rw-r--r--tests/ui/async-await/in-trait/fn-not-async-err2.current.stderr12
-rw-r--r--tests/ui/async-await/in-trait/fn-not-async-err2.next.stderr12
-rw-r--r--tests/ui/async-await/in-trait/generics-mismatch.current.stderr16
-rw-r--r--tests/ui/async-await/in-trait/generics-mismatch.next.stderr16
-rw-r--r--tests/ui/async-await/in-trait/lifetime-mismatch.current.stderr12
-rw-r--r--tests/ui/async-await/in-trait/lifetime-mismatch.next.stderr12
-rw-r--r--tests/ui/async-await/in-trait/missing-feature-flag.current.stderr30
-rw-r--r--tests/ui/async-await/in-trait/missing-feature-flag.next.stderr30
-rw-r--r--tests/ui/async-await/in-trait/missing-send-bound.current.stderr20
-rw-r--r--tests/ui/async-await/in-trait/missing-send-bound.next.stderr20
-rw-r--r--tests/ui/async-await/in-trait/missing-send-bound.stderr1
-rw-r--r--tests/ui/async-await/in-trait/object-safety.current.stderr18
-rw-r--r--tests/ui/async-await/in-trait/object-safety.next.stderr18
-rw-r--r--tests/ui/async-await/in-trait/return-not-existing-pair.current.stderr39
-rw-r--r--tests/ui/async-await/in-trait/return-not-existing-pair.next.stderr39
-rw-r--r--tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.current.stderr9
-rw-r--r--tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.next.stderr9
-rw-r--r--tests/ui/async-await/in-trait/return-type-suggestion.current.stderr14
-rw-r--r--tests/ui/async-await/in-trait/return-type-suggestion.next.stderr14
-rw-r--r--tests/ui/async-await/in-trait/return-type-suggestion.rs1
-rw-r--r--tests/ui/async-await/in-trait/return-type-suggestion.stderr4
39 files changed, 2 insertions, 687 deletions
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.current.stderr b/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.current.stderr
deleted file mode 100644
index b5ace9ada4f..00000000000
--- a/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.current.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0053]: method `foo` has an incompatible type for trait
-  --> $DIR/async-example-desugared-boxed-in-trait.rs:17:28
-   |
-LL |     async fn foo(&self) -> i32 {
-   |                            ^^^ expected `Pin<Box<dyn Future<Output = i32>>>`, found future
-   |
-note: type in trait
-  --> $DIR/async-example-desugared-boxed-in-trait.rs:13:22
-   |
-LL |     fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>>;
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: expected signature `fn(&i32) -> Pin<Box<dyn Future<Output = i32>>>`
-              found signature `fn(&i32) -> impl Future<Output = i32>`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.next.stderr b/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.next.stderr
deleted file mode 100644
index b5ace9ada4f..00000000000
--- a/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.next.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0053]: method `foo` has an incompatible type for trait
-  --> $DIR/async-example-desugared-boxed-in-trait.rs:17:28
-   |
-LL |     async fn foo(&self) -> i32 {
-   |                            ^^^ expected `Pin<Box<dyn Future<Output = i32>>>`, found future
-   |
-note: type in trait
-  --> $DIR/async-example-desugared-boxed-in-trait.rs:13:22
-   |
-LL |     fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>>;
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: expected signature `fn(&i32) -> Pin<Box<dyn Future<Output = i32>>>`
-              found signature `fn(&i32) -> impl Future<Output = i32>`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-boxed.current.stderr b/tests/ui/async-await/in-trait/async-example-desugared-boxed.current.stderr
deleted file mode 100644
index 6c0b5859186..00000000000
--- a/tests/ui/async-await/in-trait/async-example-desugared-boxed.current.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: method `foo` should be async because the method from the trait is async
-  --> $DIR/async-example-desugared-boxed.rs:17:5
-   |
-LL |     async fn foo(&self) -> i32;
-   |     --------------------------- required because the trait method is async
-...
-LL |     fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>> {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-boxed.next.stderr b/tests/ui/async-await/in-trait/async-example-desugared-boxed.next.stderr
deleted file mode 100644
index 6c0b5859186..00000000000
--- a/tests/ui/async-await/in-trait/async-example-desugared-boxed.next.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: method `foo` should be async because the method from the trait is async
-  --> $DIR/async-example-desugared-boxed.rs:17:5
-   |
-LL |     async fn foo(&self) -> i32;
-   |     --------------------------- required because the trait method is async
-...
-LL |     fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>> {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-manual.current.stderr b/tests/ui/async-await/in-trait/async-example-desugared-manual.current.stderr
deleted file mode 100644
index 0d2551ab84f..00000000000
--- a/tests/ui/async-await/in-trait/async-example-desugared-manual.current.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: method `foo` should be async because the method from the trait is async
-  --> $DIR/async-example-desugared-manual.rs:25:5
-   |
-LL |     async fn foo(&self) -> i32;
-   |     --------------------------- required because the trait method is async
-...
-LL |     fn foo(&self) -> MyFuture {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-manual.next.stderr b/tests/ui/async-await/in-trait/async-example-desugared-manual.next.stderr
deleted file mode 100644
index 0d2551ab84f..00000000000
--- a/tests/ui/async-await/in-trait/async-example-desugared-manual.next.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: method `foo` should be async because the method from the trait is async
-  --> $DIR/async-example-desugared-manual.rs:25:5
-   |
-LL |     async fn foo(&self) -> i32;
-   |     --------------------------- required because the trait method is async
-...
-LL |     fn foo(&self) -> MyFuture {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/tests/ui/async-await/in-trait/async-generics-and-bounds.current.stderr b/tests/ui/async-await/in-trait/async-generics-and-bounds.current.stderr
deleted file mode 100644
index 780da068962..00000000000
--- a/tests/ui/async-await/in-trait/async-generics-and-bounds.current.stderr
+++ /dev/null
@@ -1,37 +0,0 @@
-error[E0311]: the parameter type `U` may not live long enough
-  --> $DIR/async-generics-and-bounds.rs:14:28
-   |
-LL |     async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
-   |                            ^^^^^^^
-   |
-note: the parameter type `U` must be valid for the anonymous lifetime defined here...
-  --> $DIR/async-generics-and-bounds.rs:14:18
-   |
-LL |     async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
-   |                  ^^^^^
-note: ...so that the reference type `&(T, U)` does not outlive the data it points at
-  --> $DIR/async-generics-and-bounds.rs:14:28
-   |
-LL |     async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
-   |                            ^^^^^^^
-
-error[E0311]: the parameter type `T` may not live long enough
-  --> $DIR/async-generics-and-bounds.rs:14:28
-   |
-LL |     async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
-   |                            ^^^^^^^
-   |
-note: the parameter type `T` must be valid for the anonymous lifetime defined here...
-  --> $DIR/async-generics-and-bounds.rs:14:18
-   |
-LL |     async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
-   |                  ^^^^^
-note: ...so that the reference type `&(T, U)` does not outlive the data it points at
-  --> $DIR/async-generics-and-bounds.rs:14:28
-   |
-LL |     async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
-   |                            ^^^^^^^
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0311`.
diff --git a/tests/ui/async-await/in-trait/async-generics-and-bounds.next.stderr b/tests/ui/async-await/in-trait/async-generics-and-bounds.next.stderr
deleted file mode 100644
index 780da068962..00000000000
--- a/tests/ui/async-await/in-trait/async-generics-and-bounds.next.stderr
+++ /dev/null
@@ -1,37 +0,0 @@
-error[E0311]: the parameter type `U` may not live long enough
-  --> $DIR/async-generics-and-bounds.rs:14:28
-   |
-LL |     async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
-   |                            ^^^^^^^
-   |
-note: the parameter type `U` must be valid for the anonymous lifetime defined here...
-  --> $DIR/async-generics-and-bounds.rs:14:18
-   |
-LL |     async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
-   |                  ^^^^^
-note: ...so that the reference type `&(T, U)` does not outlive the data it points at
-  --> $DIR/async-generics-and-bounds.rs:14:28
-   |
-LL |     async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
-   |                            ^^^^^^^
-
-error[E0311]: the parameter type `T` may not live long enough
-  --> $DIR/async-generics-and-bounds.rs:14:28
-   |
-LL |     async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
-   |                            ^^^^^^^
-   |
-note: the parameter type `T` must be valid for the anonymous lifetime defined here...
-  --> $DIR/async-generics-and-bounds.rs:14:18
-   |
-LL |     async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
-   |                  ^^^^^
-note: ...so that the reference type `&(T, U)` does not outlive the data it points at
-  --> $DIR/async-generics-and-bounds.rs:14:28
-   |
-LL |     async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
-   |                            ^^^^^^^
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0311`.
diff --git a/tests/ui/async-await/in-trait/async-generics.current.stderr b/tests/ui/async-await/in-trait/async-generics.current.stderr
deleted file mode 100644
index 04e1ab6d769..00000000000
--- a/tests/ui/async-await/in-trait/async-generics.current.stderr
+++ /dev/null
@@ -1,37 +0,0 @@
-error[E0311]: the parameter type `U` may not live long enough
-  --> $DIR/async-generics.rs:11:28
-   |
-LL |     async fn foo(&self) -> &(T, U);
-   |                            ^^^^^^^
-   |
-note: the parameter type `U` must be valid for the anonymous lifetime defined here...
-  --> $DIR/async-generics.rs:11:18
-   |
-LL |     async fn foo(&self) -> &(T, U);
-   |                  ^^^^^
-note: ...so that the reference type `&(T, U)` does not outlive the data it points at
-  --> $DIR/async-generics.rs:11:28
-   |
-LL |     async fn foo(&self) -> &(T, U);
-   |                            ^^^^^^^
-
-error[E0311]: the parameter type `T` may not live long enough
-  --> $DIR/async-generics.rs:11:28
-   |
-LL |     async fn foo(&self) -> &(T, U);
-   |                            ^^^^^^^
-   |
-note: the parameter type `T` must be valid for the anonymous lifetime defined here...
-  --> $DIR/async-generics.rs:11:18
-   |
-LL |     async fn foo(&self) -> &(T, U);
-   |                  ^^^^^
-note: ...so that the reference type `&(T, U)` does not outlive the data it points at
-  --> $DIR/async-generics.rs:11:28
-   |
-LL |     async fn foo(&self) -> &(T, U);
-   |                            ^^^^^^^
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0311`.
diff --git a/tests/ui/async-await/in-trait/async-generics.next.stderr b/tests/ui/async-await/in-trait/async-generics.next.stderr
deleted file mode 100644
index 04e1ab6d769..00000000000
--- a/tests/ui/async-await/in-trait/async-generics.next.stderr
+++ /dev/null
@@ -1,37 +0,0 @@
-error[E0311]: the parameter type `U` may not live long enough
-  --> $DIR/async-generics.rs:11:28
-   |
-LL |     async fn foo(&self) -> &(T, U);
-   |                            ^^^^^^^
-   |
-note: the parameter type `U` must be valid for the anonymous lifetime defined here...
-  --> $DIR/async-generics.rs:11:18
-   |
-LL |     async fn foo(&self) -> &(T, U);
-   |                  ^^^^^
-note: ...so that the reference type `&(T, U)` does not outlive the data it points at
-  --> $DIR/async-generics.rs:11:28
-   |
-LL |     async fn foo(&self) -> &(T, U);
-   |                            ^^^^^^^
-
-error[E0311]: the parameter type `T` may not live long enough
-  --> $DIR/async-generics.rs:11:28
-   |
-LL |     async fn foo(&self) -> &(T, U);
-   |                            ^^^^^^^
-   |
-note: the parameter type `T` must be valid for the anonymous lifetime defined here...
-  --> $DIR/async-generics.rs:11:18
-   |
-LL |     async fn foo(&self) -> &(T, U);
-   |                  ^^^^^
-note: ...so that the reference type `&(T, U)` does not outlive the data it points at
-  --> $DIR/async-generics.rs:11:28
-   |
-LL |     async fn foo(&self) -> &(T, U);
-   |                            ^^^^^^^
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0311`.
diff --git a/tests/ui/async-await/in-trait/async-recursive-generic.current.stderr b/tests/ui/async-await/in-trait/async-recursive-generic.current.stderr
deleted file mode 100644
index 67b491f19d2..00000000000
--- a/tests/ui/async-await/in-trait/async-recursive-generic.current.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0733]: recursion in an `async fn` requires boxing
-  --> $DIR/async-recursive-generic.rs:13:48
-   |
-LL |     async fn foo_recursive(&self, n: usize) -> T {
-   |                                                ^ recursive `async fn`
-   |
-   = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
-   = note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0733`.
diff --git a/tests/ui/async-await/in-trait/async-recursive-generic.next.stderr b/tests/ui/async-await/in-trait/async-recursive-generic.next.stderr
deleted file mode 100644
index 67b491f19d2..00000000000
--- a/tests/ui/async-await/in-trait/async-recursive-generic.next.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0733]: recursion in an `async fn` requires boxing
-  --> $DIR/async-recursive-generic.rs:13:48
-   |
-LL |     async fn foo_recursive(&self, n: usize) -> T {
-   |                                                ^ recursive `async fn`
-   |
-   = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
-   = note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0733`.
diff --git a/tests/ui/async-await/in-trait/async-recursive.current.stderr b/tests/ui/async-await/in-trait/async-recursive.current.stderr
deleted file mode 100644
index 85af27e3746..00000000000
--- a/tests/ui/async-await/in-trait/async-recursive.current.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0733]: recursion in an `async fn` requires boxing
-  --> $DIR/async-recursive.rs:13:48
-   |
-LL |     async fn foo_recursive(&self, n: usize) -> i32 {
-   |                                                ^^^ recursive `async fn`
-   |
-   = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
-   = note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0733`.
diff --git a/tests/ui/async-await/in-trait/async-recursive.next.stderr b/tests/ui/async-await/in-trait/async-recursive.next.stderr
deleted file mode 100644
index 85af27e3746..00000000000
--- a/tests/ui/async-await/in-trait/async-recursive.next.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0733]: recursion in an `async fn` requires boxing
-  --> $DIR/async-recursive.rs:13:48
-   |
-LL |     async fn foo_recursive(&self, n: usize) -> i32 {
-   |                                                ^^^ recursive `async fn`
-   |
-   = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
-   = note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0733`.
diff --git a/tests/ui/async-await/in-trait/bad-signatures.current.stderr b/tests/ui/async-await/in-trait/bad-signatures.current.stderr
deleted file mode 100644
index ae590fb057f..00000000000
--- a/tests/ui/async-await/in-trait/bad-signatures.current.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error: expected identifier, found keyword `self`
-  --> $DIR/bad-signatures.rs:8:23
-   |
-LL |     async fn bar(&abc self);
-   |                       ^^^^ expected identifier, found keyword
-
-error: expected one of `:`, `@`, or `|`, found keyword `self`
-  --> $DIR/bad-signatures.rs:8:23
-   |
-LL |     async fn bar(&abc self);
-   |                  -----^^^^
-   |                  |    |
-   |                  |    expected one of `:`, `@`, or `|`
-   |                  help: declare the type after the parameter binding: `<identifier>: <type>`
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/async-await/in-trait/bad-signatures.next.stderr b/tests/ui/async-await/in-trait/bad-signatures.next.stderr
deleted file mode 100644
index ae590fb057f..00000000000
--- a/tests/ui/async-await/in-trait/bad-signatures.next.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error: expected identifier, found keyword `self`
-  --> $DIR/bad-signatures.rs:8:23
-   |
-LL |     async fn bar(&abc self);
-   |                       ^^^^ expected identifier, found keyword
-
-error: expected one of `:`, `@`, or `|`, found keyword `self`
-  --> $DIR/bad-signatures.rs:8:23
-   |
-LL |     async fn bar(&abc self);
-   |                  -----^^^^
-   |                  |    |
-   |                  |    expected one of `:`, `@`, or `|`
-   |                  help: declare the type after the parameter binding: `<identifier>: <type>`
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.current.stderr b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.current.stderr
deleted file mode 100644
index eec5ab06539..00000000000
--- a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.current.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: async associated function in trait cannot be specialized
-  --> $DIR/dont-project-to-specializable-projection.rs:16:5
-   |
-LL |     default async fn foo(_: T) -> &'static str {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: specialization behaves in inconsistent and surprising ways with `#![feature(async_fn_in_trait)]`, and for now is disallowed
-
-error: aborting due to previous error
-
diff --git a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.next.stderr b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.next.stderr
deleted file mode 100644
index 25a7f3bb56a..00000000000
--- a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.next.stderr
+++ /dev/null
@@ -1,25 +0,0 @@
-error[E0053]: method `foo` has an incompatible type for trait
-  --> $DIR/dont-project-to-specializable-projection.rs:16:35
-   |
-LL |     default async fn foo(_: T) -> &'static str {
-   |                                   ^^^^^^^^^^^^ expected associated type, found future
-   |
-note: type in trait
-  --> $DIR/dont-project-to-specializable-projection.rs:12:27
-   |
-LL |     async fn foo(_: T) -> &'static str;
-   |                           ^^^^^^^^^^^^
-   = note: expected signature `fn(_) -> impl Future<Output = &'static str>`
-              found signature `fn(_) -> impl Future<Output = &'static str>`
-
-error: async associated function in trait cannot be specialized
-  --> $DIR/dont-project-to-specializable-projection.rs:16:5
-   |
-LL |     default async fn foo(_: T) -> &'static str {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: specialization behaves in inconsistent and surprising ways with `#![feature(async_fn_in_trait)]`, and for now is disallowed
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/async-await/in-trait/fn-not-async-err2.current.stderr b/tests/ui/async-await/in-trait/fn-not-async-err2.current.stderr
deleted file mode 100644
index 1a749514989..00000000000
--- a/tests/ui/async-await/in-trait/fn-not-async-err2.current.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `impl` method return types
-  --> $DIR/fn-not-async-err2.rs:15:22
-   |
-LL |     fn foo(&self) -> impl Future<Output = i32> {
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0562`.
diff --git a/tests/ui/async-await/in-trait/fn-not-async-err2.next.stderr b/tests/ui/async-await/in-trait/fn-not-async-err2.next.stderr
deleted file mode 100644
index 1a749514989..00000000000
--- a/tests/ui/async-await/in-trait/fn-not-async-err2.next.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `impl` method return types
-  --> $DIR/fn-not-async-err2.rs:15:22
-   |
-LL |     fn foo(&self) -> impl Future<Output = i32> {
-   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0562`.
diff --git a/tests/ui/async-await/in-trait/generics-mismatch.current.stderr b/tests/ui/async-await/in-trait/generics-mismatch.current.stderr
deleted file mode 100644
index be23384e049..00000000000
--- a/tests/ui/async-await/in-trait/generics-mismatch.current.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error[E0053]: method `foo` has an incompatible generic parameter for trait `Foo`
-  --> $DIR/generics-mismatch.rs:13:18
-   |
-LL | trait Foo {
-   |       ---
-LL |     async fn foo<T>();
-   |                  - expected type parameter
-...
-LL | impl Foo for () {
-   | ---------------
-LL |     async fn foo<const N: usize>() {}
-   |                  ^^^^^^^^^^^^^^ found const parameter of type `usize`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/async-await/in-trait/generics-mismatch.next.stderr b/tests/ui/async-await/in-trait/generics-mismatch.next.stderr
deleted file mode 100644
index be23384e049..00000000000
--- a/tests/ui/async-await/in-trait/generics-mismatch.next.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error[E0053]: method `foo` has an incompatible generic parameter for trait `Foo`
-  --> $DIR/generics-mismatch.rs:13:18
-   |
-LL | trait Foo {
-   |       ---
-LL |     async fn foo<T>();
-   |                  - expected type parameter
-...
-LL | impl Foo for () {
-   | ---------------
-LL |     async fn foo<const N: usize>() {}
-   |                  ^^^^^^^^^^^^^^ found const parameter of type `usize`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/async-await/in-trait/lifetime-mismatch.current.stderr b/tests/ui/async-await/in-trait/lifetime-mismatch.current.stderr
deleted file mode 100644
index 69e7c65ee3e..00000000000
--- a/tests/ui/async-await/in-trait/lifetime-mismatch.current.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0195]: lifetime parameters or bounds on method `foo` do not match the trait declaration
-  --> $DIR/lifetime-mismatch.rs:13:17
-   |
-LL |     async fn foo<'a>(&self);
-   |                 ---- lifetimes in impl do not match this method in trait
-...
-LL |     async fn foo(&self) {}
-   |                 ^ lifetimes do not match method in trait
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0195`.
diff --git a/tests/ui/async-await/in-trait/lifetime-mismatch.next.stderr b/tests/ui/async-await/in-trait/lifetime-mismatch.next.stderr
deleted file mode 100644
index 69e7c65ee3e..00000000000
--- a/tests/ui/async-await/in-trait/lifetime-mismatch.next.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0195]: lifetime parameters or bounds on method `foo` do not match the trait declaration
-  --> $DIR/lifetime-mismatch.rs:13:17
-   |
-LL |     async fn foo<'a>(&self);
-   |                 ---- lifetimes in impl do not match this method in trait
-...
-LL |     async fn foo(&self) {}
-   |                 ^ lifetimes do not match method in trait
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0195`.
diff --git a/tests/ui/async-await/in-trait/missing-feature-flag.current.stderr b/tests/ui/async-await/in-trait/missing-feature-flag.current.stderr
deleted file mode 100644
index e6ac9bc2277..00000000000
--- a/tests/ui/async-await/in-trait/missing-feature-flag.current.stderr
+++ /dev/null
@@ -1,30 +0,0 @@
-error[E0046]: not all trait items implemented, missing: `foo`
-  --> $DIR/missing-feature-flag.rs:14:1
-   |
-LL |     async fn foo(_: T) -> &'static str;
-   |     ----------------------------------- `foo` from trait
-...
-LL | impl<T> MyTrait<T> for MyStruct {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
-
-error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
-  --> $DIR/missing-feature-flag.rs:18:5
-   |
-LL | impl<T> MyTrait<T> for MyStruct {}
-   | ------------------------------- parent `impl` is here
-...
-LL |     async fn foo(_: i32) -> &'static str {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
-   |
-   = note: to specialize, `foo` in the parent `impl` must be marked `default`
-
-error[E0308]: mismatched types
-  --> $DIR/missing-feature-flag.rs:18:42
-   |
-LL |     async fn foo(_: i32) -> &'static str {}
-   |                                          ^^ expected `&str`, found `()`
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0046, E0308, E0520.
-For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/async-await/in-trait/missing-feature-flag.next.stderr b/tests/ui/async-await/in-trait/missing-feature-flag.next.stderr
deleted file mode 100644
index e6ac9bc2277..00000000000
--- a/tests/ui/async-await/in-trait/missing-feature-flag.next.stderr
+++ /dev/null
@@ -1,30 +0,0 @@
-error[E0046]: not all trait items implemented, missing: `foo`
-  --> $DIR/missing-feature-flag.rs:14:1
-   |
-LL |     async fn foo(_: T) -> &'static str;
-   |     ----------------------------------- `foo` from trait
-...
-LL | impl<T> MyTrait<T> for MyStruct {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
-
-error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
-  --> $DIR/missing-feature-flag.rs:18:5
-   |
-LL | impl<T> MyTrait<T> for MyStruct {}
-   | ------------------------------- parent `impl` is here
-...
-LL |     async fn foo(_: i32) -> &'static str {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
-   |
-   = note: to specialize, `foo` in the parent `impl` must be marked `default`
-
-error[E0308]: mismatched types
-  --> $DIR/missing-feature-flag.rs:18:42
-   |
-LL |     async fn foo(_: i32) -> &'static str {}
-   |                                          ^^ expected `&str`, found `()`
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0046, E0308, E0520.
-For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/async-await/in-trait/missing-send-bound.current.stderr b/tests/ui/async-await/in-trait/missing-send-bound.current.stderr
deleted file mode 100644
index 9aa37f7437e..00000000000
--- a/tests/ui/async-await/in-trait/missing-send-bound.current.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error: future cannot be sent between threads safely
-  --> $DIR/missing-send-bound.rs:16:20
-   |
-LL |     assert_is_send(test::<T>());
-   |                    ^^^^^^^^^^^ future returned by `test` is not `Send`
-   |
-   = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`
-note: future is not `Send` as it awaits another future which is not `Send`
-  --> $DIR/missing-send-bound.rs:12:5
-   |
-LL |     T::bar().await;
-   |     ^^^^^^^^ await occurs here on type `impl Future<Output = ()>`, which is not `Send`
-note: required by a bound in `assert_is_send`
-  --> $DIR/missing-send-bound.rs:20:27
-   |
-LL | fn assert_is_send(_: impl Send) {}
-   |                           ^^^^ required by this bound in `assert_is_send`
-
-error: aborting due to previous error
-
diff --git a/tests/ui/async-await/in-trait/missing-send-bound.next.stderr b/tests/ui/async-await/in-trait/missing-send-bound.next.stderr
deleted file mode 100644
index 9aa37f7437e..00000000000
--- a/tests/ui/async-await/in-trait/missing-send-bound.next.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error: future cannot be sent between threads safely
-  --> $DIR/missing-send-bound.rs:16:20
-   |
-LL |     assert_is_send(test::<T>());
-   |                    ^^^^^^^^^^^ future returned by `test` is not `Send`
-   |
-   = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`
-note: future is not `Send` as it awaits another future which is not `Send`
-  --> $DIR/missing-send-bound.rs:12:5
-   |
-LL |     T::bar().await;
-   |     ^^^^^^^^ await occurs here on type `impl Future<Output = ()>`, which is not `Send`
-note: required by a bound in `assert_is_send`
-  --> $DIR/missing-send-bound.rs:20:27
-   |
-LL | fn assert_is_send(_: impl Send) {}
-   |                           ^^^^ required by this bound in `assert_is_send`
-
-error: aborting due to previous error
-
diff --git a/tests/ui/async-await/in-trait/missing-send-bound.stderr b/tests/ui/async-await/in-trait/missing-send-bound.stderr
index 18185b75554..330dbef3978 100644
--- a/tests/ui/async-await/in-trait/missing-send-bound.stderr
+++ b/tests/ui/async-await/in-trait/missing-send-bound.stderr
@@ -5,6 +5,7 @@ LL |     assert_is_send(test::<T>());
    |                    ^^^^^^^^^^^ future returned by `test` is not `Send`
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`
+   = note: consider using `std::sync::Arc<impl Future<Output = ()>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
 note: future is not `Send` as it awaits another future which is not `Send`
   --> $DIR/missing-send-bound.rs:10:5
    |
diff --git a/tests/ui/async-await/in-trait/object-safety.current.stderr b/tests/ui/async-await/in-trait/object-safety.current.stderr
deleted file mode 100644
index 7f7ec39142c..00000000000
--- a/tests/ui/async-await/in-trait/object-safety.current.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:12:12
-   |
-LL |     let x: &dyn Foo = todo!();
-   |            ^^^^^^^^ `Foo` cannot be made into an object
-   |
-note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety.rs:8:14
-   |
-LL | trait Foo {
-   |       --- this trait cannot be made into an object...
-LL |     async fn foo(&self);
-   |              ^^^ ...because method `foo` is `async`
-   = help: consider moving `foo` to another trait
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/async-await/in-trait/object-safety.next.stderr b/tests/ui/async-await/in-trait/object-safety.next.stderr
deleted file mode 100644
index 7f7ec39142c..00000000000
--- a/tests/ui/async-await/in-trait/object-safety.next.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:12:12
-   |
-LL |     let x: &dyn Foo = todo!();
-   |            ^^^^^^^^ `Foo` cannot be made into an object
-   |
-note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety.rs:8:14
-   |
-LL | trait Foo {
-   |       --- this trait cannot be made into an object...
-LL |     async fn foo(&self);
-   |              ^^^ ...because method `foo` is `async`
-   = help: consider moving `foo` to another trait
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/async-await/in-trait/return-not-existing-pair.current.stderr b/tests/ui/async-await/in-trait/return-not-existing-pair.current.stderr
deleted file mode 100644
index 56973a1d11a..00000000000
--- a/tests/ui/async-await/in-trait/return-not-existing-pair.current.stderr
+++ /dev/null
@@ -1,39 +0,0 @@
-error[E0726]: implicit elided lifetime not allowed here
-  --> $DIR/return-not-existing-pair.rs:12:20
-   |
-LL | impl<'a, 'b, T, U> MyTrait<T> for U {
-   |                    ^^^^^^^^^^ expected lifetime parameters
-   |
-help: indicate the anonymous lifetimes
-   |
-LL | impl<'a, 'b, T, U> MyTrait<'_, '_, T> for U {
-   |                            +++++++
-
-error[E0412]: cannot find type `ConnImpl` in this scope
-  --> $DIR/return-not-existing-pair.rs:8:48
-   |
-LL |     async fn foo(&'a self, key: &'b T) -> (&'a ConnImpl, &'b T);
-   |                                                ^^^^^^^^ not found in this scope
-
-error[E0186]: method `foo` has a `&self` declaration in the trait, but not in the impl
-  --> $DIR/return-not-existing-pair.rs:14:5
-   |
-LL |     async fn foo(&'a self, key: &'b T) -> (&'a ConnImpl, &'b T);
-   |     ------------------------------------------------------------ `&self` used in trait
-...
-LL |     async fn foo(_: T) -> (&'a U, &'b T) {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&self` in impl
-
-error[E0308]: mismatched types
-  --> $DIR/return-not-existing-pair.rs:14:42
-   |
-LL |     async fn foo(_: T) -> (&'a U, &'b T) {}
-   |                                          ^^ expected `(&U, &T)`, found `()`
-   |
-   = note:  expected tuple `(&'a U, &'b T)`
-           found unit type `()`
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0186, E0308, E0412, E0726.
-For more information about an error, try `rustc --explain E0186`.
diff --git a/tests/ui/async-await/in-trait/return-not-existing-pair.next.stderr b/tests/ui/async-await/in-trait/return-not-existing-pair.next.stderr
deleted file mode 100644
index 56973a1d11a..00000000000
--- a/tests/ui/async-await/in-trait/return-not-existing-pair.next.stderr
+++ /dev/null
@@ -1,39 +0,0 @@
-error[E0726]: implicit elided lifetime not allowed here
-  --> $DIR/return-not-existing-pair.rs:12:20
-   |
-LL | impl<'a, 'b, T, U> MyTrait<T> for U {
-   |                    ^^^^^^^^^^ expected lifetime parameters
-   |
-help: indicate the anonymous lifetimes
-   |
-LL | impl<'a, 'b, T, U> MyTrait<'_, '_, T> for U {
-   |                            +++++++
-
-error[E0412]: cannot find type `ConnImpl` in this scope
-  --> $DIR/return-not-existing-pair.rs:8:48
-   |
-LL |     async fn foo(&'a self, key: &'b T) -> (&'a ConnImpl, &'b T);
-   |                                                ^^^^^^^^ not found in this scope
-
-error[E0186]: method `foo` has a `&self` declaration in the trait, but not in the impl
-  --> $DIR/return-not-existing-pair.rs:14:5
-   |
-LL |     async fn foo(&'a self, key: &'b T) -> (&'a ConnImpl, &'b T);
-   |     ------------------------------------------------------------ `&self` used in trait
-...
-LL |     async fn foo(_: T) -> (&'a U, &'b T) {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&self` in impl
-
-error[E0308]: mismatched types
-  --> $DIR/return-not-existing-pair.rs:14:42
-   |
-LL |     async fn foo(_: T) -> (&'a U, &'b T) {}
-   |                                          ^^ expected `(&U, &T)`, found `()`
-   |
-   = note:  expected tuple `(&'a U, &'b T)`
-           found unit type `()`
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0186, E0308, E0412, E0726.
-For more information about an error, try `rustc --explain E0186`.
diff --git a/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.current.stderr b/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.current.stderr
deleted file mode 100644
index 2564d68d591..00000000000
--- a/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.current.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0412]: cannot find type `Missing` in this scope
-  --> $DIR/return-not-existing-type-wrapping-rpitit.rs:10:25
-   |
-LL |     fn bar() -> Wrapper<Missing<impl Sized>>;
-   |                         ^^^^^^^ not found in this scope
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.next.stderr b/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.next.stderr
deleted file mode 100644
index 2564d68d591..00000000000
--- a/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.next.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0412]: cannot find type `Missing` in this scope
-  --> $DIR/return-not-existing-type-wrapping-rpitit.rs:10:25
-   |
-LL |     fn bar() -> Wrapper<Missing<impl Sized>>;
-   |                         ^^^^^^^ not found in this scope
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/async-await/in-trait/return-type-suggestion.current.stderr b/tests/ui/async-await/in-trait/return-type-suggestion.current.stderr
deleted file mode 100644
index 6a107d7beb8..00000000000
--- a/tests/ui/async-await/in-trait/return-type-suggestion.current.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0308]: mismatched types
-  --> $DIR/return-type-suggestion.rs:9:9
-   |
-LL |         Ok(())
-   |         ^^^^^^- help: consider using a semicolon here: `;`
-   |         |
-   |         expected `()`, found `Result<(), _>`
-   |
-   = note: expected unit type `()`
-                   found enum `Result<(), _>`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/async-await/in-trait/return-type-suggestion.next.stderr b/tests/ui/async-await/in-trait/return-type-suggestion.next.stderr
deleted file mode 100644
index 6a107d7beb8..00000000000
--- a/tests/ui/async-await/in-trait/return-type-suggestion.next.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0308]: mismatched types
-  --> $DIR/return-type-suggestion.rs:9:9
-   |
-LL |         Ok(())
-   |         ^^^^^^- help: consider using a semicolon here: `;`
-   |         |
-   |         expected `()`, found `Result<(), _>`
-   |
-   = note: expected unit type `()`
-                   found enum `Result<(), _>`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/async-await/in-trait/return-type-suggestion.rs b/tests/ui/async-await/in-trait/return-type-suggestion.rs
index 92a9e035e89..cdab4ea0f37 100644
--- a/tests/ui/async-await/in-trait/return-type-suggestion.rs
+++ b/tests/ui/async-await/in-trait/return-type-suggestion.rs
@@ -6,7 +6,6 @@ trait A {
     async fn e() {
         Ok(())
         //~^ ERROR mismatched types
-        //~| HELP consider using a semicolon here
     }
 }
 
diff --git a/tests/ui/async-await/in-trait/return-type-suggestion.stderr b/tests/ui/async-await/in-trait/return-type-suggestion.stderr
index d9309459812..179c9ed93db 100644
--- a/tests/ui/async-await/in-trait/return-type-suggestion.stderr
+++ b/tests/ui/async-await/in-trait/return-type-suggestion.stderr
@@ -2,9 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/return-type-suggestion.rs:7:9
    |
 LL |         Ok(())
-   |         ^^^^^^- help: consider using a semicolon here: `;`
-   |         |
-   |         expected `()`, found `Result<(), _>`
+   |         ^^^^^^ expected `()`, found `Result<(), _>`
    |
    = note: expected unit type `()`
                    found enum `Result<(), _>`