summaryrefslogtreecommitdiffstats
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-associated-types.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-default-fn-overridden.rs2
-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-in-trait.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.stderr (renamed from tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.current.stderr)4
-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-boxed.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-boxed.stderr (renamed from tests/ui/async-await/in-trait/async-example-desugared-boxed.current.stderr)2
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-extra.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs2
-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-example-desugared-manual.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-manual.stderr (renamed from tests/ui/async-await/in-trait/async-example-desugared-manual.current.stderr)2
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared.rs2
-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-and-bounds.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-generics-and-bounds.stderr (renamed from tests/ui/async-await/in-trait/async-generics-and-bounds.current.stderr)20
-rw-r--r--tests/ui/async-await/in-trait/async-generics.next.stderr37
-rw-r--r--tests/ui/async-await/in-trait/async-generics.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-generics.stderr (renamed from tests/ui/async-await/in-trait/async-generics.current.stderr)20
-rw-r--r--tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-lifetimes.rs2
-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-generic.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-recursive-generic.stderr (renamed from tests/ui/async-await/in-trait/async-recursive-generic.current.stderr)2
-rw-r--r--tests/ui/async-await/in-trait/async-recursive.next.stderr12
-rw-r--r--tests/ui/async-await/in-trait/async-recursive.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-recursive.stderr (renamed from tests/ui/async-await/in-trait/async-recursive.current.stderr)2
-rw-r--r--tests/ui/async-await/in-trait/bad-signatures.next.stderr17
-rw-r--r--tests/ui/async-await/in-trait/bad-signatures.rs2
-rw-r--r--tests/ui/async-await/in-trait/bad-signatures.stderr (renamed from tests/ui/async-await/in-trait/bad-signatures.current.stderr)4
-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.rs2
-rw-r--r--tests/ui/async-await/in-trait/dont-project-to-specializable-projection.stderr (renamed from tests/ui/async-await/in-trait/dont-project-to-specializable-projection.next.stderr)6
-rw-r--r--tests/ui/async-await/in-trait/early-bound-1.rs2
-rw-r--r--tests/ui/async-await/in-trait/early-bound-2.rs2
-rw-r--r--tests/ui/async-await/in-trait/fn-not-async-err2.next.stderr12
-rw-r--r--tests/ui/async-await/in-trait/fn-not-async-err2.rs2
-rw-r--r--tests/ui/async-await/in-trait/fn-not-async-err2.stderr (renamed from tests/ui/async-await/in-trait/fn-not-async-err2.current.stderr)2
-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/implied-bounds.rs2
-rw-r--r--tests/ui/async-await/in-trait/issue-102138.rs2
-rw-r--r--tests/ui/async-await/in-trait/issue-102219.rs2
-rw-r--r--tests/ui/async-await/in-trait/issue-102310.rs2
-rw-r--r--tests/ui/async-await/in-trait/issue-104678.rs2
-rw-r--r--tests/ui/async-await/in-trait/lifetime-mismatch.next.stderr12
-rw-r--r--tests/ui/async-await/in-trait/lifetime-mismatch.rs2
-rw-r--r--tests/ui/async-await/in-trait/lifetime-mismatch.stderr (renamed from tests/ui/async-await/in-trait/lifetime-mismatch.current.stderr)2
-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.rs2
-rw-r--r--tests/ui/async-await/in-trait/missing-feature-flag.stderr (renamed from tests/ui/async-await/in-trait/missing-feature-flag.next.stderr)6
-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.rs2
-rw-r--r--tests/ui/async-await/in-trait/missing-send-bound.stderr (renamed from tests/ui/async-await/in-trait/missing-send-bound.current.stderr)6
-rw-r--r--tests/ui/async-await/in-trait/object-safety.next.stderr18
-rw-r--r--tests/ui/async-await/in-trait/object-safety.rs2
-rw-r--r--tests/ui/async-await/in-trait/object-safety.stderr (renamed from tests/ui/async-await/in-trait/object-safety.current.stderr)4
-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-pair.rs2
-rw-r--r--tests/ui/async-await/in-trait/return-not-existing-pair.stderr (renamed from tests/ui/async-await/in-trait/return-not-existing-pair.current.stderr)8
-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.rs2
-rw-r--r--tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.stderr (renamed from tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.next.stderr)2
-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.rs3
-rw-r--r--tests/ui/async-await/in-trait/return-type-suggestion.stderr (renamed from tests/ui/async-await/in-trait/return-type-suggestion.current.stderr)6
67 files changed, 48 insertions, 463 deletions
diff --git a/tests/ui/async-await/in-trait/async-associated-types.rs b/tests/ui/async-await/in-trait/async-associated-types.rs
index 89ca4039b..974f5aaff 100644
--- a/tests/ui/async-await/in-trait/async-associated-types.rs
+++ b/tests/ui/async-await/in-trait/async-associated-types.rs
@@ -1,7 +1,5 @@
// check-pass
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![feature(impl_trait_projections)]
diff --git a/tests/ui/async-await/in-trait/async-default-fn-overridden.rs b/tests/ui/async-await/in-trait/async-default-fn-overridden.rs
index 99c3ba6a3..06413fe6f 100644
--- a/tests/ui/async-await/in-trait/async-default-fn-overridden.rs
+++ b/tests/ui/async-await/in-trait/async-default-fn-overridden.rs
@@ -1,7 +1,5 @@
// run-pass
// edition:2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
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 b5ace9ada..000000000
--- 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-in-trait.rs b/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs
index 7b53379b2..38ba29718 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs
+++ b/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs
@@ -1,6 +1,4 @@
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![feature(return_position_impl_trait_in_trait)]
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.stderr
index b5ace9ada..168ef8e9e 100644
--- 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.stderr
@@ -1,11 +1,11 @@
error[E0053]: method `foo` has an incompatible type for trait
- --> $DIR/async-example-desugared-boxed-in-trait.rs:17:28
+ --> $DIR/async-example-desugared-boxed-in-trait.rs:15: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
+ --> $DIR/async-example-desugared-boxed-in-trait.rs:11:22
|
LL | fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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 6c0b58591..000000000
--- 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-boxed.rs b/tests/ui/async-await/in-trait/async-example-desugared-boxed.rs
index 916488ffa..1b1b3cffd 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-boxed.rs
+++ b/tests/ui/async-await/in-trait/async-example-desugared-boxed.rs
@@ -1,6 +1,4 @@
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![feature(return_position_impl_trait_in_trait)]
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.stderr
index 6c0b58591..60fa534a6 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-boxed.current.stderr
+++ b/tests/ui/async-await/in-trait/async-example-desugared-boxed.stderr
@@ -1,5 +1,5 @@
error: method `foo` should be async because the method from the trait is async
- --> $DIR/async-example-desugared-boxed.rs:17:5
+ --> $DIR/async-example-desugared-boxed.rs:15:5
|
LL | async fn foo(&self) -> i32;
| --------------------------- required because the trait method is async
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-extra.rs b/tests/ui/async-await/in-trait/async-example-desugared-extra.rs
index edac0b374..81e1e59a3 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-extra.rs
+++ b/tests/ui/async-await/in-trait/async-example-desugared-extra.rs
@@ -1,7 +1,5 @@
// check-pass
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![feature(return_position_impl_trait_in_trait)]
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs b/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs
index 934f7643d..feeda719e 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs
+++ b/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs
@@ -1,7 +1,5 @@
// check-pass
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![feature(return_position_impl_trait_in_trait)]
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 0d2551ab8..000000000
--- 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-example-desugared-manual.rs b/tests/ui/async-await/in-trait/async-example-desugared-manual.rs
index 4883828d3..71473e745 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-manual.rs
+++ b/tests/ui/async-await/in-trait/async-example-desugared-manual.rs
@@ -1,6 +1,4 @@
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![feature(return_position_impl_trait_in_trait)]
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.stderr
index 0d2551ab8..567a36a86 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-manual.current.stderr
+++ b/tests/ui/async-await/in-trait/async-example-desugared-manual.stderr
@@ -1,5 +1,5 @@
error: method `foo` should be async because the method from the trait is async
- --> $DIR/async-example-desugared-manual.rs:25:5
+ --> $DIR/async-example-desugared-manual.rs:23:5
|
LL | async fn foo(&self) -> i32;
| --------------------------- required because the trait method is async
diff --git a/tests/ui/async-await/in-trait/async-example-desugared.rs b/tests/ui/async-await/in-trait/async-example-desugared.rs
index 214171b2e..fb92ec786 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared.rs
+++ b/tests/ui/async-await/in-trait/async-example-desugared.rs
@@ -1,7 +1,5 @@
// check-pass
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![feature(return_position_impl_trait_in_trait)]
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 780da0689..000000000
--- 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-and-bounds.rs b/tests/ui/async-await/in-trait/async-generics-and-bounds.rs
index 146e74ec2..a73d55adf 100644
--- a/tests/ui/async-await/in-trait/async-generics-and-bounds.rs
+++ b/tests/ui/async-await/in-trait/async-generics-and-bounds.rs
@@ -1,8 +1,6 @@
// check-fail
// known-bug: #102682
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
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.stderr
index 780da0689..5c8d64fc6 100644
--- a/tests/ui/async-await/in-trait/async-generics-and-bounds.current.stderr
+++ b/tests/ui/async-await/in-trait/async-generics-and-bounds.stderr
@@ -1,33 +1,33 @@
error[E0311]: the parameter type `U` may not live long enough
- --> $DIR/async-generics-and-bounds.rs:14:28
+ --> $DIR/async-generics-and-bounds.rs:12: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
+note: the parameter type `U` must be valid for the anonymous lifetime as defined here...
+ --> $DIR/async-generics-and-bounds.rs:12: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
+ --> $DIR/async-generics-and-bounds.rs:12: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
+ --> $DIR/async-generics-and-bounds.rs:12: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
+note: the parameter type `T` must be valid for the anonymous lifetime as defined here...
+ --> $DIR/async-generics-and-bounds.rs:12: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
+ --> $DIR/async-generics-and-bounds.rs:12:28
|
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
| ^^^^^^^
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 04e1ab6d7..000000000
--- 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-generics.rs b/tests/ui/async-await/in-trait/async-generics.rs
index 507500abf..67000e577 100644
--- a/tests/ui/async-await/in-trait/async-generics.rs
+++ b/tests/ui/async-await/in-trait/async-generics.rs
@@ -1,8 +1,6 @@
// check-fail
// known-bug: #102682
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
diff --git a/tests/ui/async-await/in-trait/async-generics.current.stderr b/tests/ui/async-await/in-trait/async-generics.stderr
index 04e1ab6d7..6ae73d9e3 100644
--- a/tests/ui/async-await/in-trait/async-generics.current.stderr
+++ b/tests/ui/async-await/in-trait/async-generics.stderr
@@ -1,33 +1,33 @@
error[E0311]: the parameter type `U` may not live long enough
- --> $DIR/async-generics.rs:11:28
+ --> $DIR/async-generics.rs:9: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
+note: the parameter type `U` must be valid for the anonymous lifetime as defined here...
+ --> $DIR/async-generics.rs:9: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
+ --> $DIR/async-generics.rs:9: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
+ --> $DIR/async-generics.rs:9: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
+note: the parameter type `T` must be valid for the anonymous lifetime as defined here...
+ --> $DIR/async-generics.rs:9: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
+ --> $DIR/async-generics.rs:9:28
|
LL | async fn foo(&self) -> &(T, U);
| ^^^^^^^
diff --git a/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs b/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs
index 9869a8d71..d5481d277 100644
--- a/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs
+++ b/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs
@@ -1,7 +1,5 @@
// check-pass
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
diff --git a/tests/ui/async-await/in-trait/async-lifetimes.rs b/tests/ui/async-await/in-trait/async-lifetimes.rs
index ecbd1910a..f298e45d2 100644
--- a/tests/ui/async-await/in-trait/async-lifetimes.rs
+++ b/tests/ui/async-await/in-trait/async-lifetimes.rs
@@ -1,7 +1,5 @@
// check-pass
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
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 67b491f19..000000000
--- 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-generic.rs b/tests/ui/async-await/in-trait/async-recursive-generic.rs
index 64c6ba15c..6839abd38 100644
--- a/tests/ui/async-await/in-trait/async-recursive-generic.rs
+++ b/tests/ui/async-await/in-trait/async-recursive-generic.rs
@@ -1,6 +1,4 @@
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
diff --git a/tests/ui/async-await/in-trait/async-recursive-generic.current.stderr b/tests/ui/async-await/in-trait/async-recursive-generic.stderr
index 67b491f19..cab173bdd 100644
--- a/tests/ui/async-await/in-trait/async-recursive-generic.current.stderr
+++ b/tests/ui/async-await/in-trait/async-recursive-generic.stderr
@@ -1,5 +1,5 @@
error[E0733]: recursion in an `async fn` requires boxing
- --> $DIR/async-recursive-generic.rs:13:48
+ --> $DIR/async-recursive-generic.rs:11:48
|
LL | async fn foo_recursive(&self, n: usize) -> T {
| ^ recursive `async fn`
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 85af27e37..000000000
--- 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/async-recursive.rs b/tests/ui/async-await/in-trait/async-recursive.rs
index d928909e3..61119f809 100644
--- a/tests/ui/async-await/in-trait/async-recursive.rs
+++ b/tests/ui/async-await/in-trait/async-recursive.rs
@@ -1,6 +1,4 @@
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
diff --git a/tests/ui/async-await/in-trait/async-recursive.current.stderr b/tests/ui/async-await/in-trait/async-recursive.stderr
index 85af27e37..9feff37b3 100644
--- a/tests/ui/async-await/in-trait/async-recursive.current.stderr
+++ b/tests/ui/async-await/in-trait/async-recursive.stderr
@@ -1,5 +1,5 @@
error[E0733]: recursion in an `async fn` requires boxing
- --> $DIR/async-recursive.rs:13:48
+ --> $DIR/async-recursive.rs:11:48
|
LL | async fn foo_recursive(&self, n: usize) -> i32 {
| ^^^ recursive `async fn`
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 ae590fb05..000000000
--- 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/bad-signatures.rs b/tests/ui/async-await/in-trait/bad-signatures.rs
index 4baddd8cc..98dddc126 100644
--- a/tests/ui/async-await/in-trait/bad-signatures.rs
+++ b/tests/ui/async-await/in-trait/bad-signatures.rs
@@ -1,6 +1,4 @@
// edition:2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
diff --git a/tests/ui/async-await/in-trait/bad-signatures.current.stderr b/tests/ui/async-await/in-trait/bad-signatures.stderr
index ae590fb05..7cbd96e24 100644
--- a/tests/ui/async-await/in-trait/bad-signatures.current.stderr
+++ b/tests/ui/async-await/in-trait/bad-signatures.stderr
@@ -1,11 +1,11 @@
error: expected identifier, found keyword `self`
- --> $DIR/bad-signatures.rs:8:23
+ --> $DIR/bad-signatures.rs:6: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
+ --> $DIR/bad-signatures.rs:6:23
|
LL | async fn bar(&abc self);
| -----^^^^
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 eec5ab065..000000000
--- 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.rs b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs
index 7183eaccc..afd3db5e0 100644
--- a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs
+++ b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs
@@ -1,7 +1,5 @@
// edition: 2021
// known-bug: #108309
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![feature(min_specialization)]
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.stderr
index 25a7f3bb5..7c750bf51 100644
--- 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.stderr
@@ -1,11 +1,11 @@
error[E0053]: method `foo` has an incompatible type for trait
- --> $DIR/dont-project-to-specializable-projection.rs:16:35
+ --> $DIR/dont-project-to-specializable-projection.rs:14: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
+ --> $DIR/dont-project-to-specializable-projection.rs:10:27
|
LL | async fn foo(_: T) -> &'static str;
| ^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL | async fn foo(_: T) -> &'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
+ --> $DIR/dont-project-to-specializable-projection.rs:14:5
|
LL | default async fn foo(_: T) -> &'static str {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/async-await/in-trait/early-bound-1.rs b/tests/ui/async-await/in-trait/early-bound-1.rs
index 30843473d..6b3b14201 100644
--- a/tests/ui/async-await/in-trait/early-bound-1.rs
+++ b/tests/ui/async-await/in-trait/early-bound-1.rs
@@ -1,7 +1,5 @@
// check-pass
// edition:2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
diff --git a/tests/ui/async-await/in-trait/early-bound-2.rs b/tests/ui/async-await/in-trait/early-bound-2.rs
index 1c5a68c2a..270443229 100644
--- a/tests/ui/async-await/in-trait/early-bound-2.rs
+++ b/tests/ui/async-await/in-trait/early-bound-2.rs
@@ -1,7 +1,5 @@
// check-pass
// edition:2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
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 1a7495149..000000000
--- 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/fn-not-async-err2.rs b/tests/ui/async-await/in-trait/fn-not-async-err2.rs
index 5fdb7296a..78017429f 100644
--- a/tests/ui/async-await/in-trait/fn-not-async-err2.rs
+++ b/tests/ui/async-await/in-trait/fn-not-async-err2.rs
@@ -1,6 +1,4 @@
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
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.stderr
index 1a7495149..37d9669c0 100644
--- a/tests/ui/async-await/in-trait/fn-not-async-err2.current.stderr
+++ b/tests/ui/async-await/in-trait/fn-not-async-err2.stderr
@@ -1,5 +1,5 @@
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
+ --> $DIR/fn-not-async-err2.rs:13:22
|
LL | fn foo(&self) -> impl Future<Output = i32> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
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 be23384e0..000000000
--- 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 be23384e0..000000000
--- 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/implied-bounds.rs b/tests/ui/async-await/in-trait/implied-bounds.rs
index 45ada1d84..52bceb3cc 100644
--- a/tests/ui/async-await/in-trait/implied-bounds.rs
+++ b/tests/ui/async-await/in-trait/implied-bounds.rs
@@ -1,7 +1,5 @@
// check-pass
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
diff --git a/tests/ui/async-await/in-trait/issue-102138.rs b/tests/ui/async-await/in-trait/issue-102138.rs
index ced30b7e4..f61b34ed9 100644
--- a/tests/ui/async-await/in-trait/issue-102138.rs
+++ b/tests/ui/async-await/in-trait/issue-102138.rs
@@ -1,7 +1,5 @@
// check-pass
// edition:2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
diff --git a/tests/ui/async-await/in-trait/issue-102219.rs b/tests/ui/async-await/in-trait/issue-102219.rs
index f3fdfa345..9a35f6515 100644
--- a/tests/ui/async-await/in-trait/issue-102219.rs
+++ b/tests/ui/async-await/in-trait/issue-102219.rs
@@ -1,8 +1,6 @@
// compile-flags:--crate-type=lib
// edition:2021
// check-pass
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
diff --git a/tests/ui/async-await/in-trait/issue-102310.rs b/tests/ui/async-await/in-trait/issue-102310.rs
index 8e5dbd08e..49c3e9fee 100644
--- a/tests/ui/async-await/in-trait/issue-102310.rs
+++ b/tests/ui/async-await/in-trait/issue-102310.rs
@@ -1,7 +1,5 @@
// check-pass
// edition:2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
diff --git a/tests/ui/async-await/in-trait/issue-104678.rs b/tests/ui/async-await/in-trait/issue-104678.rs
index 3d010f180..e396df4e5 100644
--- a/tests/ui/async-await/in-trait/issue-104678.rs
+++ b/tests/ui/async-await/in-trait/issue-104678.rs
@@ -1,7 +1,5 @@
// edition:2021
// check-pass
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
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 69e7c65ee..000000000
--- 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/lifetime-mismatch.rs b/tests/ui/async-await/in-trait/lifetime-mismatch.rs
index 46183f72b..bb793df5d 100644
--- a/tests/ui/async-await/in-trait/lifetime-mismatch.rs
+++ b/tests/ui/async-await/in-trait/lifetime-mismatch.rs
@@ -1,6 +1,4 @@
// edition:2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
diff --git a/tests/ui/async-await/in-trait/lifetime-mismatch.current.stderr b/tests/ui/async-await/in-trait/lifetime-mismatch.stderr
index 69e7c65ee..86592269c 100644
--- a/tests/ui/async-await/in-trait/lifetime-mismatch.current.stderr
+++ b/tests/ui/async-await/in-trait/lifetime-mismatch.stderr
@@ -1,5 +1,5 @@
error[E0195]: lifetime parameters or bounds on method `foo` do not match the trait declaration
- --> $DIR/lifetime-mismatch.rs:13:17
+ --> $DIR/lifetime-mismatch.rs:11:17
|
LL | async fn foo<'a>(&self);
| ---- lifetimes in impl do not match this method in trait
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 e6ac9bc22..000000000
--- 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.rs b/tests/ui/async-await/in-trait/missing-feature-flag.rs
index 6481f4a70..34dd50a1c 100644
--- a/tests/ui/async-await/in-trait/missing-feature-flag.rs
+++ b/tests/ui/async-await/in-trait/missing-feature-flag.rs
@@ -1,6 +1,4 @@
// edition:2018
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
#![feature(min_specialization)]
diff --git a/tests/ui/async-await/in-trait/missing-feature-flag.next.stderr b/tests/ui/async-await/in-trait/missing-feature-flag.stderr
index e6ac9bc22..f6aba1fcd 100644
--- a/tests/ui/async-await/in-trait/missing-feature-flag.next.stderr
+++ b/tests/ui/async-await/in-trait/missing-feature-flag.stderr
@@ -1,5 +1,5 @@
error[E0046]: not all trait items implemented, missing: `foo`
- --> $DIR/missing-feature-flag.rs:14:1
+ --> $DIR/missing-feature-flag.rs:12:1
|
LL | async fn foo(_: T) -> &'static str;
| ----------------------------------- `foo` from trait
@@ -8,7 +8,7 @@ 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
+ --> $DIR/missing-feature-flag.rs:16:5
|
LL | impl<T> MyTrait<T> for MyStruct {}
| ------------------------------- parent `impl` is here
@@ -19,7 +19,7 @@ LL | async fn foo(_: i32) -> &'static str {}
= note: to specialize, `foo` in the parent `impl` must be marked `default`
error[E0308]: mismatched types
- --> $DIR/missing-feature-flag.rs:18:42
+ --> $DIR/missing-feature-flag.rs:16:42
|
LL | async fn foo(_: i32) -> &'static str {}
| ^^ expected `&str`, found `()`
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 9aa37f743..000000000
--- 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.rs b/tests/ui/async-await/in-trait/missing-send-bound.rs
index b602865cb..dbcc66576 100644
--- a/tests/ui/async-await/in-trait/missing-send-bound.rs
+++ b/tests/ui/async-await/in-trait/missing-send-bound.rs
@@ -1,6 +1,4 @@
// edition:2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
diff --git a/tests/ui/async-await/in-trait/missing-send-bound.current.stderr b/tests/ui/async-await/in-trait/missing-send-bound.stderr
index 9aa37f743..18185b755 100644
--- a/tests/ui/async-await/in-trait/missing-send-bound.current.stderr
+++ b/tests/ui/async-await/in-trait/missing-send-bound.stderr
@@ -1,17 +1,17 @@
error: future cannot be sent between threads safely
- --> $DIR/missing-send-bound.rs:16:20
+ --> $DIR/missing-send-bound.rs:14: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
+ --> $DIR/missing-send-bound.rs:10: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
+ --> $DIR/missing-send-bound.rs:18:27
|
LL | fn assert_is_send(_: impl Send) {}
| ^^^^ required by this bound in `assert_is_send`
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 7f7ec3914..000000000
--- 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/object-safety.rs b/tests/ui/async-await/in-trait/object-safety.rs
index 4edad1512..441539e5d 100644
--- a/tests/ui/async-await/in-trait/object-safety.rs
+++ b/tests/ui/async-await/in-trait/object-safety.rs
@@ -1,6 +1,4 @@
// edition:2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
diff --git a/tests/ui/async-await/in-trait/object-safety.current.stderr b/tests/ui/async-await/in-trait/object-safety.stderr
index 7f7ec3914..ccdf9d887 100644
--- a/tests/ui/async-await/in-trait/object-safety.current.stderr
+++ b/tests/ui/async-await/in-trait/object-safety.stderr
@@ -1,11 +1,11 @@
error[E0038]: the trait `Foo` cannot be made into an object
- --> $DIR/object-safety.rs:12:12
+ --> $DIR/object-safety.rs:10: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
+ --> $DIR/object-safety.rs:6:14
|
LL | trait Foo {
| --- this trait cannot be made into an object...
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 56973a1d1..000000000
--- 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-pair.rs b/tests/ui/async-await/in-trait/return-not-existing-pair.rs
index d1b3832d1..a14dfceed 100644
--- a/tests/ui/async-await/in-trait/return-not-existing-pair.rs
+++ b/tests/ui/async-await/in-trait/return-not-existing-pair.rs
@@ -1,6 +1,4 @@
// edition:2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
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.stderr
index 56973a1d1..e573b8517 100644
--- a/tests/ui/async-await/in-trait/return-not-existing-pair.current.stderr
+++ b/tests/ui/async-await/in-trait/return-not-existing-pair.stderr
@@ -1,5 +1,5 @@
error[E0726]: implicit elided lifetime not allowed here
- --> $DIR/return-not-existing-pair.rs:12:20
+ --> $DIR/return-not-existing-pair.rs:10:20
|
LL | impl<'a, 'b, T, U> MyTrait<T> for U {
| ^^^^^^^^^^ expected lifetime parameters
@@ -10,13 +10,13 @@ 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
+ --> $DIR/return-not-existing-pair.rs:6: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
+ --> $DIR/return-not-existing-pair.rs:12:5
|
LL | async fn foo(&'a self, key: &'b T) -> (&'a ConnImpl, &'b T);
| ------------------------------------------------------------ `&self` used in trait
@@ -25,7 +25,7 @@ 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
+ --> $DIR/return-not-existing-pair.rs:12:42
|
LL | async fn foo(_: T) -> (&'a U, &'b T) {}
| ^^ expected `(&U, &T)`, found `()`
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 2564d68d5..000000000
--- 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.rs b/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs
index 37c02827e..254b9a782 100644
--- a/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs
+++ b/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs
@@ -1,6 +1,4 @@
// edition:2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(return_position_impl_trait_in_trait)]
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.stderr
index 2564d68d5..059934d24 100644
--- 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.stderr
@@ -1,5 +1,5 @@
error[E0412]: cannot find type `Missing` in this scope
- --> $DIR/return-not-existing-type-wrapping-rpitit.rs:10:25
+ --> $DIR/return-not-existing-type-wrapping-rpitit.rs:8:25
|
LL | fn bar() -> Wrapper<Missing<impl Sized>>;
| ^^^^^^^ not found in this scope
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 6a107d7be..000000000
--- 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 d63bccefa..cdab4ea0f 100644
--- a/tests/ui/async-await/in-trait/return-type-suggestion.rs
+++ b/tests/ui/async-await/in-trait/return-type-suggestion.rs
@@ -1,6 +1,4 @@
// edition: 2021
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(async_fn_in_trait)]
@@ -8,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.current.stderr b/tests/ui/async-await/in-trait/return-type-suggestion.stderr
index 6a107d7be..179c9ed93 100644
--- a/tests/ui/async-await/in-trait/return-type-suggestion.current.stderr
+++ b/tests/ui/async-await/in-trait/return-type-suggestion.stderr
@@ -1,10 +1,8 @@
error[E0308]: mismatched types
- --> $DIR/return-type-suggestion.rs:9:9
+ --> $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<(), _>`