From 88669aed22aeeef5fb7ecdb7f43ed33e674f8fcb Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Sat, 7 Dec 2024 23:54:10 +0000 Subject: Don't use AsyncFnOnce::CallOnceFuture bounds for signature deduction --- tests/ui/async-await/async-closures/call-once-deduction.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/ui/async-await/async-closures/call-once-deduction.rs (limited to 'tests') 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) +where + F: AsyncFnOnce<(), CallOnceFuture = O>, +{ +} + +fn main() { + bar(async move || {}); +} -- cgit 1.4.1-3-g733a5