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 e47aae7 commit 731f155Copy full SHA for 731f155
src/closures.rs
@@ -170,6 +170,7 @@ fn rewrite_closure_expr(
170
fn allow_multi_line(expr: &ast::Expr) -> bool {
171
match expr.kind {
172
ast::ExprKind::Match(..)
173
+ | ast::ExprKind::Async(..)
174
| ast::ExprKind::Block(..)
175
| ast::ExprKind::TryBlock(..)
176
| 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