File tree Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -1357,7 +1357,7 @@ pub fn can_be_overflowed_expr(
1357
1357
}
1358
1358
1359
1359
// Handle always block-like expressions
1360
- ast:: ExprKind :: Block ( ..) | ast:: ExprKind :: Closure ( ..) => true ,
1360
+ ast:: ExprKind :: Async ( .. ) | ast :: ExprKind :: Block ( ..) | ast:: ExprKind :: Closure ( ..) => true ,
1361
1361
1362
1362
// Handle `[]` and `{}`-like expressions
1363
1363
ast:: ExprKind :: Array ( ..) | ast:: ExprKind :: Struct ( ..) => {
Original file line number Diff line number Diff line change @@ -16,4 +16,20 @@ fn baz() {
16
16
let y = async {
17
17
Ok ( ( ) )
18
18
} ; // comment
19
+
20
+ spawn (
21
+ a,
22
+ async move {
23
+ action ( ) ;
24
+ Ok ( ( ) )
25
+ } ,
26
+ ) ;
27
+
28
+ spawn (
29
+ a,
30
+ async move || {
31
+ action ( ) ;
32
+ Ok ( ( ) )
33
+ } ,
34
+ ) ;
19
35
}
Original file line number Diff line number Diff line change @@ -12,4 +12,14 @@ fn baz() {
12
12
} ;
13
13
14
14
let y = async { Ok ( ( ) ) } ; // comment
15
+
16
+ spawn ( a, async move {
17
+ action ( ) ;
18
+ Ok ( ( ) )
19
+ } ) ;
20
+
21
+ spawn ( a, async move || {
22
+ action ( ) ;
23
+ Ok ( ( ) )
24
+ } ) ;
15
25
}
You can’t perform that action at this time.
0 commit comments