Skip to content

Commit df625bd

Browse files
committed
Add async fn test for #66695
1 parent 1f850f6 commit df625bd

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// build-pass
2+
// edition:2018
3+
4+
static A: [i32; 5] = [1, 2, 3, 4, 5];
5+
6+
async fn fun() {
7+
let u = A[async { 1 }.await];
8+
match A {
9+
i if async { true }.await => (),
10+
_ => (),
11+
}
12+
}
13+
14+
fn main() {
15+
async {
16+
let u = A[async { 1 }.await];
17+
};
18+
async {
19+
match A {
20+
i if async { true }.await => (),
21+
_ => (),
22+
}
23+
};
24+
}

0 commit comments

Comments
 (0)