summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /tests/ui/async-await
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/async-await')
-rw-r--r--tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs11
-rw-r--r--tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr78
-rw-r--r--tests/ui/async-await/clone-suggestion.stderr2
-rw-r--r--tests/ui/async-await/edition-deny-async-fns-2015.rs2
-rw-r--r--tests/ui/async-await/edition-deny-async-fns-2015.stderr98
-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
-rw-r--r--tests/ui/async-await/issue-61452.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-61187.stderr2
-rw-r--r--tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs3
-rw-r--r--tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs3
-rw-r--r--tests/ui/async-await/normalize-output-in-signature-deduction.rs19
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-early.rs2
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-early.stderr37
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-late.rs2
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-late.stderr11
-rw-r--r--tests/ui/async-await/return-type-notation/super-method-bound.rs2
-rw-r--r--tests/ui/async-await/return-type-notation/super-method-bound.stderr11
-rw-r--r--tests/ui/async-await/return-type-notation/supertrait-bound.rs2
-rw-r--r--tests/ui/async-await/return-type-notation/supertrait-bound.stderr11
-rw-r--r--tests/ui/async-await/return-type-notation/ty-or-ct-params.rs2
-rw-r--r--tests/ui/async-await/return-type-notation/ty-or-ct-params.stderr29
-rw-r--r--tests/ui/async-await/track-caller/async-block.afn.stderr30
-rw-r--r--tests/ui/async-await/track-caller/async-block.nofeat.stderr30
-rw-r--r--tests/ui/async-await/track-caller/async-block.rs18
-rw-r--r--tests/ui/async-await/track-caller/async-block.stderr12
-rw-r--r--tests/ui/async-await/track-caller/async-closure-gate.afn.stderr57
-rw-r--r--tests/ui/async-await/track-caller/async-closure-gate.nofeat.stderr57
-rw-r--r--tests/ui/async-await/track-caller/async-closure-gate.rs41
-rw-r--r--tests/ui/async-await/track-caller/async-closure-gate.stderr12
-rw-r--r--tests/ui/async-await/track-caller/panic-track-caller.cls.stderr31
-rw-r--r--tests/ui/async-await/track-caller/panic-track-caller.nofeat.stderr14
-rw-r--r--tests/ui/async-await/track-caller/panic-track-caller.rs46
98 files changed, 592 insertions, 596 deletions
diff --git a/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs b/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs
index 554ac673d..ab675d0a1 100644
--- a/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs
+++ b/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs
@@ -49,13 +49,11 @@ async fn foo8() -> Result<(), ()> {
Ok(())
}
fn foo9() -> Result<(), ()> {
- let _ = await bar(); //~ ERROR `await` is only allowed inside `async` functions and blocks
- //~^ ERROR incorrect use of `await`
+ let _ = await bar(); //~ ERROR incorrect use of `await`
Ok(())
}
fn foo10() -> Result<(), ()> {
- let _ = await? bar(); //~ ERROR `await` is only allowed inside `async` functions and blocks
- //~^ ERROR incorrect use of `await`
+ let _ = await? bar(); //~ ERROR incorrect use of `await`
Ok(())
}
fn foo11() -> Result<(), ()> {
@@ -63,8 +61,7 @@ fn foo11() -> Result<(), ()> {
Ok(())
}
fn foo12() -> Result<(), ()> {
- let _ = (await bar())?; //~ ERROR `await` is only allowed inside `async` functions and blocks
- //~^ ERROR incorrect use of `await`
+ let _ = (await bar())?; //~ ERROR incorrect use of `await`
Ok(())
}
fn foo13() -> Result<(), ()> {
@@ -111,7 +108,6 @@ async fn foo27() -> Result<(), ()> {
fn foo28() -> Result<(), ()> {
fn foo() -> Result<(), ()> {
let _ = await!(bar())?; //~ ERROR incorrect use of `await`
- //~^ ERROR `await` is only allowed inside `async` functions
Ok(())
}
foo()
@@ -119,7 +115,6 @@ fn foo28() -> Result<(), ()> {
fn foo29() -> Result<(), ()> {
let foo = || {
let _ = await!(bar())?; //~ ERROR incorrect use of `await`
- //~^ ERROR `await` is only allowed inside `async` functions
Ok(())
};
foo()
diff --git a/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr b/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr
index 7b03e5666..928eb0b82 100644
--- a/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr
+++ b/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr
@@ -59,61 +59,61 @@ LL | let _ = await bar();
| ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
error: incorrect use of `await`
- --> $DIR/incorrect-syntax-suggestions.rs:57:13
+ --> $DIR/incorrect-syntax-suggestions.rs:56:13
|
LL | let _ = await? bar();
| ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await?`
error: incorrect use of `await`
- --> $DIR/incorrect-syntax-suggestions.rs:62:13
+ --> $DIR/incorrect-syntax-suggestions.rs:60:13
|
LL | let _ = await bar()?;
| ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await`
error: incorrect use of `await`
- --> $DIR/incorrect-syntax-suggestions.rs:66:14
+ --> $DIR/incorrect-syntax-suggestions.rs:64:14
|
LL | let _ = (await bar())?;
| ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
error: incorrect use of `await`
- --> $DIR/incorrect-syntax-suggestions.rs:71:24
+ --> $DIR/incorrect-syntax-suggestions.rs:68:24
|
LL | let _ = bar().await();
| ^^ help: `await` is not a method call, remove the parentheses
error: incorrect use of `await`
- --> $DIR/incorrect-syntax-suggestions.rs:76:24
+ --> $DIR/incorrect-syntax-suggestions.rs:73:24
|
LL | let _ = bar().await()?;
| ^^ help: `await` is not a method call, remove the parentheses
error: incorrect use of `await`
- --> $DIR/incorrect-syntax-suggestions.rs:104:13
+ --> $DIR/incorrect-syntax-suggestions.rs:101:13
|
LL | let _ = await!(bar());
| ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
error: incorrect use of `await`
- --> $DIR/incorrect-syntax-suggestions.rs:108:13
+ --> $DIR/incorrect-syntax-suggestions.rs:105:13
|
LL | let _ = await!(bar())?;
| ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
error: incorrect use of `await`
- --> $DIR/incorrect-syntax-suggestions.rs:113:17
+ --> $DIR/incorrect-syntax-suggestions.rs:110:17
|
LL | let _ = await!(bar())?;
| ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
error: incorrect use of `await`
- --> $DIR/incorrect-syntax-suggestions.rs:121:17
+ --> $DIR/incorrect-syntax-suggestions.rs:117:17
|
LL | let _ = await!(bar())?;
| ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await`
error: expected expression, found `=>`
- --> $DIR/incorrect-syntax-suggestions.rs:129:25
+ --> $DIR/incorrect-syntax-suggestions.rs:124:25
|
LL | match await { await => () }
| ----- ^^ expected expression
@@ -121,13 +121,13 @@ LL | match await { await => () }
| while parsing this incorrect await expression
error: incorrect use of `await`
- --> $DIR/incorrect-syntax-suggestions.rs:129:11
+ --> $DIR/incorrect-syntax-suggestions.rs:124:11
|
LL | match await { await => () }
| ^^^^^^^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ await => () }.await`
error: expected one of `.`, `?`, `{`, or an operator, found `}`
- --> $DIR/incorrect-syntax-suggestions.rs:132:1
+ --> $DIR/incorrect-syntax-suggestions.rs:127:1
|
LL | match await { await => () }
| ----- - expected one of `.`, `?`, `{`, or an operator
@@ -138,31 +138,7 @@ LL | }
| ^ unexpected token
error[E0728]: `await` is only allowed inside `async` functions and blocks
- --> $DIR/incorrect-syntax-suggestions.rs:52:13
- |
-LL | fn foo9() -> Result<(), ()> {
- | ---- this is not `async`
-LL | let _ = await bar();
- | ^^^^^ only allowed inside `async` functions and blocks
-
-error[E0728]: `await` is only allowed inside `async` functions and blocks
- --> $DIR/incorrect-syntax-suggestions.rs:57:13
- |
-LL | fn foo10() -> Result<(), ()> {
- | ----- this is not `async`
-LL | let _ = await? bar();
- | ^^^^^ only allowed inside `async` functions and blocks
-
-error[E0728]: `await` is only allowed inside `async` functions and blocks
- --> $DIR/incorrect-syntax-suggestions.rs:66:14
- |
-LL | fn foo12() -> Result<(), ()> {
- | ----- this is not `async`
-LL | let _ = (await bar())?;
- | ^^^^^ only allowed inside `async` functions and blocks
-
-error[E0728]: `await` is only allowed inside `async` functions and blocks
- --> $DIR/incorrect-syntax-suggestions.rs:71:19
+ --> $DIR/incorrect-syntax-suggestions.rs:68:19
|
LL | fn foo13() -> Result<(), ()> {
| ----- this is not `async`
@@ -170,7 +146,7 @@ LL | let _ = bar().await();
| ^^^^^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
- --> $DIR/incorrect-syntax-suggestions.rs:76:19
+ --> $DIR/incorrect-syntax-suggestions.rs:73:19
|
LL | fn foo14() -> Result<(), ()> {
| ----- this is not `async`
@@ -178,7 +154,7 @@ LL | let _ = bar().await()?;
| ^^^^^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
- --> $DIR/incorrect-syntax-suggestions.rs:81:19
+ --> $DIR/incorrect-syntax-suggestions.rs:78:19
|
LL | fn foo15() -> Result<(), ()> {
| ----- this is not `async`
@@ -186,7 +162,7 @@ LL | let _ = bar().await;
| ^^^^^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
- --> $DIR/incorrect-syntax-suggestions.rs:85:19
+ --> $DIR/incorrect-syntax-suggestions.rs:82:19
|
LL | fn foo16() -> Result<(), ()> {
| ----- this is not `async`
@@ -194,7 +170,7 @@ LL | let _ = bar().await?;
| ^^^^^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
- --> $DIR/incorrect-syntax-suggestions.rs:90:23
+ --> $DIR/incorrect-syntax-suggestions.rs:87:23
|
LL | fn foo() -> Result<(), ()> {
| --- this is not `async`
@@ -202,29 +178,13 @@ LL | let _ = bar().await?;
| ^^^^^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
- --> $DIR/incorrect-syntax-suggestions.rs:97:23
+ --> $DIR/incorrect-syntax-suggestions.rs:94:23
|
LL | let foo = || {
| -- this is not `async`
LL | let _ = bar().await?;
| ^^^^^ only allowed inside `async` functions and blocks
-error[E0728]: `await` is only allowed inside `async` functions and blocks
- --> $DIR/incorrect-syntax-suggestions.rs:113:17
- |
-LL | fn foo() -> Result<(), ()> {
- | --- this is not `async`
-LL | let _ = await!(bar())?;
- | ^^^^^ only allowed inside `async` functions and blocks
-
-error[E0728]: `await` is only allowed inside `async` functions and blocks
- --> $DIR/incorrect-syntax-suggestions.rs:121:17
- |
-LL | let foo = || {
- | -- this is not `async`
-LL | let _ = await!(bar())?;
- | ^^^^^ only allowed inside `async` functions and blocks
-
-error: aborting due to 33 previous errors
+error: aborting due to 28 previous errors
For more information about this error, try `rustc --explain E0728`.
diff --git a/tests/ui/async-await/clone-suggestion.stderr b/tests/ui/async-await/clone-suggestion.stderr
index c02206f6f..b5c8ef699 100644
--- a/tests/ui/async-await/clone-suggestion.stderr
+++ b/tests/ui/async-await/clone-suggestion.stderr
@@ -13,7 +13,7 @@ note: `into_future` takes ownership of the receiver `self`, which moves `f`
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
LL | f.clone().await;
- | ++++++++
+ | ++++++++
error: aborting due to previous error
diff --git a/tests/ui/async-await/edition-deny-async-fns-2015.rs b/tests/ui/async-await/edition-deny-async-fns-2015.rs
index d4c30dc9d..6bd6d879a 100644
--- a/tests/ui/async-await/edition-deny-async-fns-2015.rs
+++ b/tests/ui/async-await/edition-deny-async-fns-2015.rs
@@ -1,6 +1,4 @@
// edition:2015
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
async fn foo() {} //~ ERROR `async fn` is not permitted in Rust 2015
diff --git a/tests/ui/async-await/edition-deny-async-fns-2015.stderr b/tests/ui/async-await/edition-deny-async-fns-2015.stderr
new file mode 100644
index 000000000..ba918eb28
--- /dev/null
+++ b/tests/ui/async-await/edition-deny-async-fns-2015.stderr
@@ -0,0 +1,98 @@
+error[E0670]: `async fn` is not permitted in Rust 2015
+ --> $DIR/edition-deny-async-fns-2015.rs:3:1
+ |
+LL | async fn foo() {}
+ | ^^^^^ to use `async fn`, switch to Rust 2018 or later
+ |
+ = help: pass `--edition 2021` to `rustc`
+ = note: for more on editions, read https://doc.rust-lang.org/edition-guide
+
+error[E0670]: `async fn` is not permitted in Rust 2015
+ --> $DIR/edition-deny-async-fns-2015.rs:5:12
+ |
+LL | fn baz() { async fn foo() {} }
+ | ^^^^^ to use `async fn`, switch to Rust 2018 or later
+ |
+ = help: pass `--edition 2021` to `rustc`
+ = note: for more on editions, read https://doc.rust-lang.org/edition-guide
+
+error[E0670]: `async fn` is not permitted in Rust 2015
+ --> $DIR/edition-deny-async-fns-2015.rs:7:1
+ |
+LL | async fn async_baz() {
+ | ^^^^^ to use `async fn`, switch to Rust 2018 or later
+ |
+ = help: pass `--edition 2021` to `rustc`
+ = note: for more on editions, read https://doc.rust-lang.org/edition-guide
+
+error[E0670]: `async fn` is not permitted in Rust 2015
+ --> $DIR/edition-deny-async-fns-2015.rs:8:5
+ |
+LL | async fn bar() {}
+ | ^^^^^ to use `async fn`, switch to Rust 2018 or later
+ |
+ = help: pass `--edition 2021` to `rustc`
+ = note: for more on editions, read https://doc.rust-lang.org/edition-guide
+
+error[E0670]: `async fn` is not permitted in Rust 2015
+ --> $DIR/edition-deny-async-fns-2015.rs:14:5
+ |
+LL | async fn foo() {}
+ | ^^^^^ to use `async fn`, switch to Rust 2018 or later
+ |
+ = help: pass `--edition 2021` to `rustc`
+ = note: for more on editions, read https://doc.rust-lang.org/edition-guide
+
+error[E0670]: `async fn` is not permitted in Rust 2015
+ --> $DIR/edition-deny-async-fns-2015.rs:18:5
+ |
+LL | async fn foo() {}
+ | ^^^^^ to use `async fn`, switch to Rust 2018 or later
+ |
+ = help: pass `--edition 2021` to `rustc`
+ = note: for more on editions, read https://doc.rust-lang.org/edition-guide
+
+error[E0670]: `async fn` is not permitted in Rust 2015
+ --> $DIR/edition-deny-async-fns-2015.rs:36:9
+ |
+LL | async fn bar() {}
+ | ^^^^^ to use `async fn`, switch to Rust 2018 or later
+ |
+ = help: pass `--edition 2021` to `rustc`
+ = note: for more on editions, read https://doc.rust-lang.org/edition-guide
+
+error[E0670]: `async fn` is not permitted in Rust 2015
+ --> $DIR/edition-deny-async-fns-2015.rs:26:9
+ |
+LL | async fn foo() {}
+ | ^^^^^ to use `async fn`, switch to Rust 2018 or later
+ |
+ = help: pass `--edition 2021` to `rustc`
+ = note: for more on editions, read https://doc.rust-lang.org/edition-guide
+
+error[E0670]: `async fn` is not permitted in Rust 2015
+ --> $DIR/edition-deny-async-fns-2015.rs:31:13
+ |
+LL | async fn bar() {}
+ | ^^^^^ to use `async fn`, switch to Rust 2018 or later
+ |
+ = help: pass `--edition 2021` to `rustc`
+ = note: for more on editions, read https://doc.rust-lang.org/edition-guide
+
+error[E0706]: functions in traits cannot be declared `async`
+ --> $DIR/edition-deny-async-fns-2015.rs:18:5
+ |
+LL | async fn foo() {}
+ | -----^^^^^^^^^
+ | |
+ | `async` because of this
+ |
+ = note: `async` trait functions are not currently supported
+ = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
+ = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
+ = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
+
+error: aborting due to 10 previous errors
+
+Some errors have detailed explanations: E0670, E0706.
+For more information about an error, try `rustc --explain E0670`.
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<(), _>`
diff --git a/tests/ui/async-await/issue-61452.stderr b/tests/ui/async-await/issue-61452.stderr
index bf5044328..3f623ba8a 100644
--- a/tests/ui/async-await/issue-61452.stderr
+++ b/tests/ui/async-await/issue-61452.stderr
@@ -2,7 +2,7 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
--> $DIR/issue-61452.rs:4:5
|
LL | x.take();
- | ^^^^^^^^ cannot borrow as mutable
+ | ^ cannot borrow as mutable
|
help: consider changing this to be mutable
|
diff --git a/tests/ui/async-await/issues/issue-61187.stderr b/tests/ui/async-await/issues/issue-61187.stderr
index e58f74546..203b17550 100644
--- a/tests/ui/async-await/issues/issue-61187.stderr
+++ b/tests/ui/async-await/issues/issue-61187.stderr
@@ -2,7 +2,7 @@ error[E0596]: cannot borrow `data` as mutable, as it is not declared as mutable
--> $DIR/issue-61187.rs:6:5
|
LL | data.reverse();
- | ^^^^^^^^^^^^^^ cannot borrow as mutable
+ | ^^^^ cannot borrow as mutable
|
help: consider changing this to be mutable
|
diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs
index ade386a60..725caddae 100644
--- a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs
+++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs
@@ -2,7 +2,8 @@
// be talking about `async fn`s instead.
// run-fail
-// error-pattern: thread 'main' panicked at '`async fn` resumed after completion'
+// error-pattern: thread 'main' panicked
+// error-pattern: `async fn` resumed after completion
// edition:2018
// ignore-wasm no panic or subprocess support
// ignore-emscripten no panic or subprocess support
diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs
index b4ea4c9f6..5909c3a5e 100644
--- a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs
+++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs
@@ -3,7 +3,8 @@
// run-fail
// needs-unwind
-// error-pattern: thread 'main' panicked at '`async fn` resumed after panicking'
+// error-pattern: thread 'main' panicked
+// error-pattern: `async fn` resumed after panicking
// edition:2018
// ignore-wasm no panic or subprocess support
diff --git a/tests/ui/async-await/normalize-output-in-signature-deduction.rs b/tests/ui/async-await/normalize-output-in-signature-deduction.rs
new file mode 100644
index 000000000..960065a83
--- /dev/null
+++ b/tests/ui/async-await/normalize-output-in-signature-deduction.rs
@@ -0,0 +1,19 @@
+// edition:2021
+// revisions: current next
+//[next] compile-flags: -Ztrait-solver=next
+// check-pass
+
+#![feature(type_alias_impl_trait)]
+
+struct Foo;
+
+impl Trait for Foo {}
+pub trait Trait {}
+
+pub type TAIT<T> = impl Trait;
+
+async fn foo<T>() -> TAIT<T> {
+ Foo
+}
+
+fn main() {}
diff --git a/tests/ui/async-await/return-type-notation/issue-110963-early.rs b/tests/ui/async-await/return-type-notation/issue-110963-early.rs
index eee31aa1f..0ecbca5c1 100644
--- a/tests/ui/async-await/return-type-notation/issue-110963-early.rs
+++ b/tests/ui/async-await/return-type-notation/issue-110963-early.rs
@@ -1,7 +1,5 @@
// edition: 2021
// known-bug: #110963
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(return_type_notation)]
#![feature(async_fn_in_trait)]
diff --git a/tests/ui/async-await/return-type-notation/issue-110963-early.stderr b/tests/ui/async-await/return-type-notation/issue-110963-early.stderr
new file mode 100644
index 000000000..33e22dec3
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/issue-110963-early.stderr
@@ -0,0 +1,37 @@
+warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/issue-110963-early.rs:4:12
+ |
+LL | #![feature(return_type_notation)]
+ | ^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
+ = note: `#[warn(incomplete_features)]` on by default
+
+error: higher-ranked lifetime error
+ --> $DIR/issue-110963-early.rs:15:5
+ |
+LL | / spawn(async move {
+LL | | let mut hc = hc;
+LL | | if !hc.check().await {
+LL | | log_health_check_failure().await;
+LL | | }
+LL | | });
+ | |______^
+ |
+ = note: could not prove `[async block@$DIR/issue-110963-early.rs:15:11: 20:6]: Send`
+
+error: higher-ranked lifetime error
+ --> $DIR/issue-110963-early.rs:15:5
+ |
+LL | / spawn(async move {
+LL | | let mut hc = hc;
+LL | | if !hc.check().await {
+LL | | log_health_check_failure().await;
+LL | | }
+LL | | });
+ | |______^
+ |
+ = note: could not prove `[async block@$DIR/issue-110963-early.rs:15:11: 20:6]: Send`
+
+error: aborting due to 2 previous errors; 1 warning emitted
+
diff --git a/tests/ui/async-await/return-type-notation/issue-110963-late.rs b/tests/ui/async-await/return-type-notation/issue-110963-late.rs
index ea047cd3b..17b5d775d 100644
--- a/tests/ui/async-await/return-type-notation/issue-110963-late.rs
+++ b/tests/ui/async-await/return-type-notation/issue-110963-late.rs
@@ -1,7 +1,5 @@
// edition: 2021
// check-pass
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
diff --git a/tests/ui/async-await/return-type-notation/issue-110963-late.stderr b/tests/ui/async-await/return-type-notation/issue-110963-late.stderr
new file mode 100644
index 000000000..9c6966537
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/issue-110963-late.stderr
@@ -0,0 +1,11 @@
+warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/issue-110963-late.rs:4:12
+ |
+LL | #![feature(return_type_notation)]
+ | ^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
+ = note: `#[warn(incomplete_features)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/async-await/return-type-notation/super-method-bound.rs b/tests/ui/async-await/return-type-notation/super-method-bound.rs
index 0163c62f5..58ea3578d 100644
--- a/tests/ui/async-await/return-type-notation/super-method-bound.rs
+++ b/tests/ui/async-await/return-type-notation/super-method-bound.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, return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
diff --git a/tests/ui/async-await/return-type-notation/super-method-bound.stderr b/tests/ui/async-await/return-type-notation/super-method-bound.stderr
new file mode 100644
index 000000000..ac0668d3c
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/super-method-bound.stderr
@@ -0,0 +1,11 @@
+warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/super-method-bound.rs:4:31
+ |
+LL | #![feature(async_fn_in_trait, return_type_notation)]
+ | ^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
+ = note: `#[warn(incomplete_features)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/async-await/return-type-notation/supertrait-bound.rs b/tests/ui/async-await/return-type-notation/supertrait-bound.rs
index 09de32c5d..19bcfe304 100644
--- a/tests/ui/async-await/return-type-notation/supertrait-bound.rs
+++ b/tests/ui/async-await/return-type-notation/supertrait-bound.rs
@@ -1,6 +1,4 @@
// check-pass
-// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
-// revisions: current next
#![feature(return_position_impl_trait_in_trait, return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete and may not be safe to use
diff --git a/tests/ui/async-await/return-type-notation/supertrait-bound.stderr b/tests/ui/async-await/return-type-notation/supertrait-bound.stderr
new file mode 100644
index 000000000..c8cec4946
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/supertrait-bound.stderr
@@ -0,0 +1,11 @@
+warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/supertrait-bound.rs:3:49
+ |
+LL | #![feature(return_position_impl_trait_in_trait, return_type_notation)]
+ | ^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
+ = note: `#[warn(incomplete_features)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/async-await/return-type-notation/ty-or-ct-params.rs b/tests/ui/async-await/return-type-notation/ty-or-ct-params.rs
index 3141da1d2..7871a2fed 100644
--- a/tests/ui/async-await/return-type-notation/ty-or-ct-params.rs
+++ b/tests/ui/async-await/return-type-notation/ty-or-ct-params.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, return_type_notation)]
//~^ WARN the feature `return_type_notation` is incomplete
diff --git a/tests/ui/async-await/return-type-notation/ty-or-ct-params.stderr b/tests/ui/async-await/return-type-notation/ty-or-ct-params.stderr
new file mode 100644
index 000000000..76928c5d7
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/ty-or-ct-params.stderr
@@ -0,0 +1,29 @@
+warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/ty-or-ct-params.rs:3:31
+ |
+LL | #![feature(async_fn_in_trait, return_type_notation)]
+ | ^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
+ = note: `#[warn(incomplete_features)]` on by default
+
+error: return type notation is not allowed for functions that have type parameters
+ --> $DIR/ty-or-ct-params.rs:14:12
+ |
+LL | async fn bar<T>() {}
+ | - type parameter declared here
+...
+LL | T: Foo<bar(): Send, baz(): Send>,
+ | ^^^^^^^^^^^
+
+error: return type notation is not allowed for functions that have const parameters
+ --> $DIR/ty-or-ct-params.rs:14:25
+ |
+LL | async fn baz<const N: usize>() {}
+ | -------------- const parameter declared here
+...
+LL | T: Foo<bar(): Send, baz(): Send>,
+ | ^^^^^^^^^^^
+
+error: aborting due to 2 previous errors; 1 warning emitted
+
diff --git a/tests/ui/async-await/track-caller/async-block.afn.stderr b/tests/ui/async-await/track-caller/async-block.afn.stderr
new file mode 100644
index 000000000..2302722ee
--- /dev/null
+++ b/tests/ui/async-await/track-caller/async-block.afn.stderr
@@ -0,0 +1,30 @@
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-block.rs:8:13
+ |
+LL | let _ = #[track_caller] async {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-block.rs:15:13
+ |
+LL | let _ = #[track_caller] async {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-block.rs:23:17
+ |
+LL | let _ = #[track_caller] async {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/async-await/track-caller/async-block.nofeat.stderr b/tests/ui/async-await/track-caller/async-block.nofeat.stderr
new file mode 100644
index 000000000..2302722ee
--- /dev/null
+++ b/tests/ui/async-await/track-caller/async-block.nofeat.stderr
@@ -0,0 +1,30 @@
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-block.rs:8:13
+ |
+LL | let _ = #[track_caller] async {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-block.rs:15:13
+ |
+LL | let _ = #[track_caller] async {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-block.rs:23:17
+ |
+LL | let _ = #[track_caller] async {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/async-await/track-caller/async-block.rs b/tests/ui/async-await/track-caller/async-block.rs
index 8ddd4ab11..24711b966 100644
--- a/tests/ui/async-await/track-caller/async-block.rs
+++ b/tests/ui/async-await/track-caller/async-block.rs
@@ -1,9 +1,27 @@
// edition:2021
+// revisions: afn nofeat
#![feature(stmt_expr_attributes)]
+#![cfg_attr(afn, feature(async_fn_track_caller))]
fn main() {
let _ = #[track_caller] async {
//~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
};
}
+
+#[track_caller]
+async fn foo() {
+ let _ = #[track_caller] async {
+ //~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
+ };
+}
+
+#[track_caller]
+async fn foo2() {
+ let _ = async {
+ let _ = #[track_caller] async {
+ //~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
+ };
+ };
+}
diff --git a/tests/ui/async-await/track-caller/async-block.stderr b/tests/ui/async-await/track-caller/async-block.stderr
deleted file mode 100644
index 21d1054d2..000000000
--- a/tests/ui/async-await/track-caller/async-block.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0658]: `#[track_caller]` on closures is currently unstable
- --> $DIR/async-block.rs:6:13
- |
-LL | let _ = #[track_caller] async {
- | ^^^^^^^^^^^^^^^
- |
- = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
- = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/async-await/track-caller/async-closure-gate.afn.stderr b/tests/ui/async-await/track-caller/async-closure-gate.afn.stderr
new file mode 100644
index 000000000..739c04a76
--- /dev/null
+++ b/tests/ui/async-await/track-caller/async-closure-gate.afn.stderr
@@ -0,0 +1,57 @@
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-closure-gate.rs:8:13
+ |
+LL | let _ = #[track_caller] async || {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-closure-gate.rs:15:13
+ |
+LL | let _ = #[track_caller] async || {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-closure-gate.rs:21:13
+ |
+LL | let _ = #[track_caller] || {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-closure-gate.rs:28:17
+ |
+LL | let _ = #[track_caller] || {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-closure-gate.rs:36:9
+ |
+LL | #[track_caller] || {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-closure-gate.rs:45:13
+ |
+LL | #[track_caller] || {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error: aborting due to 6 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/async-await/track-caller/async-closure-gate.nofeat.stderr b/tests/ui/async-await/track-caller/async-closure-gate.nofeat.stderr
new file mode 100644
index 000000000..739c04a76
--- /dev/null
+++ b/tests/ui/async-await/track-caller/async-closure-gate.nofeat.stderr
@@ -0,0 +1,57 @@
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-closure-gate.rs:8:13
+ |
+LL | let _ = #[track_caller] async || {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-closure-gate.rs:15:13
+ |
+LL | let _ = #[track_caller] async || {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-closure-gate.rs:21:13
+ |
+LL | let _ = #[track_caller] || {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-closure-gate.rs:28:17
+ |
+LL | let _ = #[track_caller] || {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-closure-gate.rs:36:9
+ |
+LL | #[track_caller] || {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error[E0658]: `#[track_caller]` on closures is currently unstable
+ --> $DIR/async-closure-gate.rs:45:13
+ |
+LL | #[track_caller] || {
+ | ^^^^^^^^^^^^^^^
+ |
+ = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
+ = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+
+error: aborting due to 6 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/async-await/track-caller/async-closure-gate.rs b/tests/ui/async-await/track-caller/async-closure-gate.rs
index d9d556855..8d8d081aa 100644
--- a/tests/ui/async-await/track-caller/async-closure-gate.rs
+++ b/tests/ui/async-await/track-caller/async-closure-gate.rs
@@ -1,9 +1,50 @@
// edition:2021
+// revisions: afn nofeat
#![feature(async_closure, stmt_expr_attributes)]
+#![cfg_attr(afn, feature(async_fn_track_caller))]
fn main() {
let _ = #[track_caller] async || {
//~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
};
}
+
+#[track_caller]
+async fn foo() {
+ let _ = #[track_caller] async || {
+ //~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
+ };
+}
+
+async fn foo2() {
+ let _ = #[track_caller] || {
+ //~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
+ };
+}
+
+fn foo3() {
+ async {
+ let _ = #[track_caller] || {
+ //~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
+ };
+ }
+}
+
+async fn foo4() {
+ let _ = || {
+ #[track_caller] || {
+ //~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
+ };
+ };
+}
+
+fn foo5() {
+ async {
+ let _ = || {
+ #[track_caller] || {
+ //~^ ERROR `#[track_caller]` on closures is currently unstable [E0658]
+ };
+ };
+ }
+}
diff --git a/tests/ui/async-await/track-caller/async-closure-gate.stderr b/tests/ui/async-await/track-caller/async-closure-gate.stderr
deleted file mode 100644
index 498f1b43b..000000000
--- a/tests/ui/async-await/track-caller/async-closure-gate.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0658]: `#[track_caller]` on closures is currently unstable
- --> $DIR/async-closure-gate.rs:6:13
- |
-LL | let _ = #[track_caller] async || {
- | ^^^^^^^^^^^^^^^
- |
- = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
- = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/async-await/track-caller/panic-track-caller.cls.stderr b/tests/ui/async-await/track-caller/panic-track-caller.cls.stderr
new file mode 100644
index 000000000..f3090e3b9
--- /dev/null
+++ b/tests/ui/async-await/track-caller/panic-track-caller.cls.stderr
@@ -0,0 +1,31 @@
+warning: `#[track_caller]` on async functions is a no-op
+ --> $DIR/panic-track-caller.rs:53:1
+ |
+LL | #[track_caller]
+ | ^^^^^^^^^^^^^^^
+...
+LL | / async fn bar_track_caller() {
+LL | | panic!()
+LL | | }
+ | |_- this function will not propagate the caller location
+ |
+ = note: see issue #110011 <https://github.com/rust-lang/rust/issues/110011> for more information
+ = help: add `#![feature(async_fn_track_caller)]` to the crate attributes to enable
+ = note: `#[warn(ungated_async_fn_track_caller)]` on by default
+
+warning: `#[track_caller]` on async functions is a no-op
+ --> $DIR/panic-track-caller.rs:67:5
+ |
+LL | #[track_caller]
+ | ^^^^^^^^^^^^^^^
+...
+LL | / async fn bar_assoc() {
+LL | | panic!();
+LL | | }
+ | |_____- this function will not propagate the caller location
+ |
+ = note: see issue #110011 <https://github.com/rust-lang/rust/issues/110011> for more information
+ = help: add `#![feature(async_fn_track_caller)]` to the crate attributes to enable
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/async-await/track-caller/panic-track-caller.nofeat.stderr b/tests/ui/async-await/track-caller/panic-track-caller.nofeat.stderr
index 51ea225f4..f3090e3b9 100644
--- a/tests/ui/async-await/track-caller/panic-track-caller.nofeat.stderr
+++ b/tests/ui/async-await/track-caller/panic-track-caller.nofeat.stderr
@@ -1,29 +1,31 @@
warning: `#[track_caller]` on async functions is a no-op
- --> $DIR/panic-track-caller.rs:50:1
+ --> $DIR/panic-track-caller.rs:53:1
|
LL | #[track_caller]
| ^^^^^^^^^^^^^^^
+...
LL | / async fn bar_track_caller() {
LL | | panic!()
LL | | }
| |_- this function will not propagate the caller location
|
- = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
- = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+ = note: see issue #110011 <https://github.com/rust-lang/rust/issues/110011> for more information
+ = help: add `#![feature(async_fn_track_caller)]` to the crate attributes to enable
= note: `#[warn(ungated_async_fn_track_caller)]` on by default
warning: `#[track_caller]` on async functions is a no-op
- --> $DIR/panic-track-caller.rs:62:5
+ --> $DIR/panic-track-caller.rs:67:5
|
LL | #[track_caller]
| ^^^^^^^^^^^^^^^
+...
LL | / async fn bar_assoc() {
LL | | panic!();
LL | | }
| |_____- this function will not propagate the caller location
|
- = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
- = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable
+ = note: see issue #110011 <https://github.com/rust-lang/rust/issues/110011> for more information
+ = help: add `#![feature(async_fn_track_caller)]` to the crate attributes to enable
warning: 2 warnings emitted
diff --git a/tests/ui/async-await/track-caller/panic-track-caller.rs b/tests/ui/async-await/track-caller/panic-track-caller.rs
index 65bb23e0b..df8290e5f 100644
--- a/tests/ui/async-await/track-caller/panic-track-caller.rs
+++ b/tests/ui/async-await/track-caller/panic-track-caller.rs
@@ -1,9 +1,12 @@
// run-pass
// edition:2021
-// revisions: feat nofeat
+// revisions: afn cls nofeat
// needs-unwind
+// gate-test-async_fn_track_caller
#![feature(async_closure, stmt_expr_attributes)]
-#![cfg_attr(feat, feature(closure_track_caller))]
+#![cfg_attr(afn, feature(async_fn_track_caller))]
+#![cfg_attr(cls, feature(closure_track_caller))]
+#![allow(unused)]
use std::future::Future;
use std::panic;
@@ -47,7 +50,9 @@ async fn foo() {
bar().await
}
-#[track_caller] //[nofeat]~ WARN `#[track_caller]` on async functions is a no-op
+#[track_caller]
+//[cls]~^ WARN `#[track_caller]` on async functions is a no-op
+//[nofeat]~^^ WARN `#[track_caller]` on async functions is a no-op
async fn bar_track_caller() {
panic!()
}
@@ -59,7 +64,9 @@ async fn foo_track_caller() {
struct Foo;
impl Foo {
- #[track_caller] //[nofeat]~ WARN `#[track_caller]` on async functions is a no-op
+ #[track_caller]
+ //[cls]~^ WARN `#[track_caller]` on async functions is a no-op
+ //[nofeat]~^^ WARN `#[track_caller]` on async functions is a no-op
async fn bar_assoc() {
panic!();
}
@@ -71,7 +78,7 @@ async fn foo_assoc() {
// Since compilation is expected to fail for this fn when using
// `nofeat`, we test that separately in `async-closure-gate.rs`
-#[cfg(feat)]
+#[cfg(cls)]
async fn foo_closure() {
let c = #[track_caller] async || {
panic!();
@@ -81,7 +88,7 @@ async fn foo_closure() {
// Since compilation is expected to fail for this fn when using
// `nofeat`, we test that separately in `async-block.rs`
-#[cfg(feat)]
+#[cfg(cls)]
async fn foo_block() {
let a = #[track_caller] async {
panic!();
@@ -106,21 +113,22 @@ fn panicked_at(f: impl FnOnce() + panic::UnwindSafe) -> u32 {
}
fn main() {
- assert_eq!(panicked_at(|| block_on(foo())), 43);
+ assert_eq!(panicked_at(|| block_on(foo())), 46
+);
- #[cfg(feat)]
- assert_eq!(panicked_at(|| block_on(foo_track_caller())), 56);
- #[cfg(nofeat)]
- assert_eq!(panicked_at(|| block_on(foo_track_caller())), 52);
+ #[cfg(afn)]
+ assert_eq!(panicked_at(|| block_on(foo_track_caller())), 61);
+ #[cfg(any(cls, nofeat))]
+ assert_eq!(panicked_at(|| block_on(foo_track_caller())), 57);
- #[cfg(feat)]
- assert_eq!(panicked_at(|| block_on(foo_assoc())), 69);
- #[cfg(nofeat)]
- assert_eq!(panicked_at(|| block_on(foo_assoc())), 64);
+ #[cfg(afn)]
+ assert_eq!(panicked_at(|| block_on(foo_assoc())), 76);
+ #[cfg(any(cls, nofeat))]
+ assert_eq!(panicked_at(|| block_on(foo_assoc())), 71);
- #[cfg(feat)]
- assert_eq!(panicked_at(|| block_on(foo_closure())), 79);
+ #[cfg(cls)]
+ assert_eq!(panicked_at(|| block_on(foo_closure())), 84);
- #[cfg(feat)]
- assert_eq!(panicked_at(|| block_on(foo_block())), 89);
+ #[cfg(cls)]
+ assert_eq!(panicked_at(|| block_on(foo_block())), 96);
}