summaryrefslogtreecommitdiffstats
path: root/tests/ui/coroutine/async-gen-deduce-yield.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/coroutine/async-gen-deduce-yield.rs')
-rw-r--r--tests/ui/coroutine/async-gen-deduce-yield.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/coroutine/async-gen-deduce-yield.rs b/tests/ui/coroutine/async-gen-deduce-yield.rs
new file mode 100644
index 000000000..9ccc8ee41
--- /dev/null
+++ b/tests/ui/coroutine/async-gen-deduce-yield.rs
@@ -0,0 +1,14 @@
+// compile-flags: --edition 2024 -Zunstable-options
+// check-pass
+
+#![feature(async_iterator, gen_blocks)]
+
+use std::async_iter::AsyncIterator;
+
+fn deduce() -> impl AsyncIterator<Item = ()> {
+ async gen {
+ yield Default::default();
+ }
+}
+
+fn main() {}