about summary refs log tree commit diff
path: root/tests/ui/async-await/async-closures
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-12-07 23:54:10 +0000
committerMichael Goulet <michael@errs.io>2024-12-08 00:01:21 +0000
commit88669aed22aeeef5fb7ecdb7f43ed33e674f8fcb (patch)
tree41c02605919971f1387a89933430255e4ef82313 /tests/ui/async-await/async-closures
parent9c707a8b769523bb6768bf58e74fa2c39cc24844 (diff)
downloadrust-88669aed22aeeef5fb7ecdb7f43ed33e674f8fcb.tar.gz
rust-88669aed22aeeef5fb7ecdb7f43ed33e674f8fcb.zip
Don't use AsyncFnOnce::CallOnceFuture bounds for signature deduction
Diffstat (limited to 'tests/ui/async-await/async-closures')
-rw-r--r--tests/ui/async-await/async-closures/call-once-deduction.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/async-await/async-closures/call-once-deduction.rs b/tests/ui/async-await/async-closures/call-once-deduction.rs
new file mode 100644
index 00000000000..41d92bc3d78
--- /dev/null
+++ b/tests/ui/async-await/async-closures/call-once-deduction.rs
@@ -0,0 +1,14 @@
+//@ edition: 2021
+//@ check-pass
+
+#![feature(async_closure, async_fn_traits, unboxed_closures)]
+
+fn bar<F, O>(_: F)
+where
+    F: AsyncFnOnce<(), CallOnceFuture = O>,
+{
+}
+
+fn main() {
+    bar(async move || {});
+}