-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't use AsyncFnOnce::CallOnceFuture bounds for signature deduction
- Loading branch information
1 parent
9c707a8
commit 88669ae
Showing
2 changed files
with
18 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
tests/ui/async-await/async-closures/call-once-deduction.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 || {}); | ||
} |