about summary refs log tree commit diff
path: root/tests/ui/async-await/recursive-async-auto-trait-overflow.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/recursive-async-auto-trait-overflow.rs')
-rw-r--r--tests/ui/async-await/recursive-async-auto-trait-overflow.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/async-await/recursive-async-auto-trait-overflow.rs b/tests/ui/async-await/recursive-async-auto-trait-overflow.rs
new file mode 100644
index 00000000000..716600ce472
--- /dev/null
+++ b/tests/ui/async-await/recursive-async-auto-trait-overflow.rs
@@ -0,0 +1,14 @@
+// Regression test for <https://github.com/rust-lang/rust/issues/145151>.
+
+//@ edition: 2024
+//@ check-pass
+
+async fn process<'a>() {
+    Box::pin(process()).await;
+}
+
+fn require_send(_: impl Send) {}
+
+fn main() {
+    require_send(process());
+}