about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorJana Dönszelmann <jana@donsz.nl>2025-10-01 00:10:49 +0200
committerJana Dönszelmann <jana@donsz.nl>2025-10-01 00:47:58 +0200
commitc1318053e3ab0578420ba93720dc479e3b526f12 (patch)
treefaaf803655e9a0f4e128f565f5888b36dac418e5 /tests
parenta2db9280539229a3b8a084a09886670a57bc7e9c (diff)
downloadrust-c1318053e3ab0578420ba93720dc479e3b526f12.tar.gz
rust-c1318053e3ab0578420ba93720dc479e3b526f12.zip
add test for trait-system-refactor-initiative/239
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/coroutine/handle_opaques_before_coroutines.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/coroutine/handle_opaques_before_coroutines.rs b/tests/ui/coroutine/handle_opaques_before_coroutines.rs
new file mode 100644
index 00000000000..2771c77429c
--- /dev/null
+++ b/tests/ui/coroutine/handle_opaques_before_coroutines.rs
@@ -0,0 +1,15 @@
+// test for https://github.com/rust-lang/trait-system-refactor-initiative/issues/239
+//@edition: 2024
+//@ check-pass
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+
+fn foo<'a>() -> impl Send {
+    if false {
+        foo();
+    }
+    async {}
+}
+
+fn main() {}