diff options
| author | Moulins <arthur.heuillard@orange.fr> | 2025-03-07 22:09:56 +0100 |
|---|---|---|
| committer | Moulins <arthur.heuillard@orange.fr> | 2025-03-08 12:36:45 +0100 |
| commit | b8a217081d0d7aef0c89c9dacc21c020faa0949b (patch) | |
| tree | 920ac6e06ab04d62d9b8df8adf542944de4639ef /tests | |
| parent | f79f3d31a3cbf87e50531851f5079e7fcba7ce81 (diff) | |
Refactor coroutine layout logic to precompute all sublayouts
Also properly attaches spans on layouts of non-promoted coroutine locals, which slightly improves the error messages for some coroutine tests.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr | 3 | ||||
| -rw-r--r-- | tests/ui/layout/post-mono-layout-cycle-2.rs | 2 | ||||
| -rw-r--r-- | tests/ui/layout/post-mono-layout-cycle-2.stderr | 6 |
3 files changed, 4 insertions, 7 deletions
diff --git a/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr b/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr index 4ca6ef89819..aa22a453744 100644 --- a/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr +++ b/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr @@ -3,6 +3,9 @@ error[E0733]: recursion in an async fn requires boxing | LL | async fn second(self) { | ^^^^^^^^^^^^^^^^^^^^^ +LL | +LL | self.first().await.second().await; + | --------------------------------- recursive call here | = note: a recursive `async fn` call must introduce indirection such as `Box::pin` to avoid an infinitely sized future diff --git a/tests/ui/layout/post-mono-layout-cycle-2.rs b/tests/ui/layout/post-mono-layout-cycle-2.rs index 2daac12d7ac..c8a4a222cc6 100644 --- a/tests/ui/layout/post-mono-layout-cycle-2.rs +++ b/tests/ui/layout/post-mono-layout-cycle-2.rs @@ -1,4 +1,4 @@ -//@ build-fail +//@ check-fail //@ edition: 2021 use std::future::Future; diff --git a/tests/ui/layout/post-mono-layout-cycle-2.stderr b/tests/ui/layout/post-mono-layout-cycle-2.stderr index d8c51deffe3..f04e01071d7 100644 --- a/tests/ui/layout/post-mono-layout-cycle-2.stderr +++ b/tests/ui/layout/post-mono-layout-cycle-2.stderr @@ -12,12 +12,6 @@ LL | Blah::iter(self, iterator).await | = note: a recursive `async fn` call must introduce indirection such as `Box::pin` to avoid an infinitely sized future -note: the above error was encountered while instantiating `fn Wrap::<()>::ice` - --> $DIR/post-mono-layout-cycle-2.rs:54:9 - | -LL | t.ice(); - | ^^^^^^^ - error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0733`. |
