We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddd36bd commit 687d7dbCopy full SHA for 687d7db
1 file changed
tests/ui/async-await/async-closures/is-fn.rs
@@ -9,11 +9,11 @@ use std::future::Future;
9
10
extern crate block_on;
11
12
-// Check that closures that don't capture any state may implement `Fn`.
+// Check that async closures that don't capture any state may implement `Fn`.
13
14
fn main() {
15
block_on::block_on(async {
16
- async fn call_once<F: Future>(x: impl FnOnce(&'static str) -> F) -> F::Output {
+ async fn call_once<F: Future>(x: impl Fn(&'static str) -> F) -> F::Output {
17
x("hello, world").await
18
}
19
call_once(async |x: &'static str| {
0 commit comments