diff options
| author | Michael Goulet <michael@errs.io> | 2024-12-07 23:54:10 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-12-08 00:01:21 +0000 |
| commit | 88669aed22aeeef5fb7ecdb7f43ed33e674f8fcb (patch) | |
| tree | 41c02605919971f1387a89933430255e4ef82313 /tests/ui/async-await/async-closures/call-once-deduction.rs | |
| parent | 9c707a8b769523bb6768bf58e74fa2c39cc24844 (diff) | |
| download | rust-88669aed22aeeef5fb7ecdb7f43ed33e674f8fcb.tar.gz rust-88669aed22aeeef5fb7ecdb7f43ed33e674f8fcb.zip | |
Don't use AsyncFnOnce::CallOnceFuture bounds for signature deduction
Diffstat (limited to 'tests/ui/async-await/async-closures/call-once-deduction.rs')
| -rw-r--r-- | tests/ui/async-await/async-closures/call-once-deduction.rs | 14 |
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 || {}); +} |
