diff options
| author | lcnr <rust@lcnr.de> | 2025-08-12 17:04:10 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2025-08-13 14:10:19 +0200 |
| commit | 4d841497da34dbe1c51071d38b5b1c440ae308b7 (patch) | |
| tree | 03dd5761e75ef83c27ea454cb62d8991ee873fa8 /tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs | |
| parent | f979bf018ff9a44118fabb96ea039903c47fb5e3 (diff) | |
| download | rust-4d841497da34dbe1c51071d38b5b1c440ae308b7.tar.gz rust-4d841497da34dbe1c51071d38b5b1c440ae308b7.zip | |
add test
Diffstat (limited to 'tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs')
| -rw-r--r-- | tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs b/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs new file mode 100644 index 00000000000..9681f66412a --- /dev/null +++ b/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs @@ -0,0 +1,17 @@ +// Regression test for #145288. This is the same issue as #145151 +// which we fixed in #145194. However in that PR we accidentally created +// a `CoroutineWitness` which referenced all generic arguments of the +// coroutine, including upvars and the signature. + +//@ edition: 2024 +//@ check-pass + +async fn process<'a>(x: &'a u32) { + Box::pin(process(x)).await; +} + +fn require_send(_: impl Send) {} + +fn main() { + require_send(process(&1)); +} |
