1
Fork 0

Add async fn test for #66695

This commit is contained in:
Matthew Jasper 2019-11-27 19:02:13 +00:00
parent 1f850f61ea
commit df625bdc26

View file

@ -0,0 +1,24 @@
// build-pass
// edition:2018
static A: [i32; 5] = [1, 2, 3, 4, 5];
async fn fun() {
let u = A[async { 1 }.await];
match A {
i if async { true }.await => (),
_ => (),
}
}
fn main() {
async {
let u = A[async { 1 }.await];
};
async {
match A {
i if async { true }.await => (),
_ => (),
}
};
}