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 d5b6560 commit 90aaf45Copy full SHA for 90aaf45
src/closures.rs
@@ -177,6 +177,7 @@ fn rewrite_closure_expr(
177
fn allow_multi_line(expr: &ast::Expr) -> bool {
178
match expr.kind {
179
ast::ExprKind::Match(..)
180
+ | ast::ExprKind::Async(..)
181
| ast::ExprKind::Block(..)
182
| ast::ExprKind::TryBlock(..)
183
| ast::ExprKind::Loop(..)
tests/target/async_closure.rs
@@ -15,4 +15,8 @@ fn main() {
15
let x = 3;
16
x
17
};
18
+
19
+ let f = |x| async {
20
+ println!("hello, world");
21
+ };
22
}
0 commit comments