Skip to content

Commit

Permalink
Add async fn test for #66695
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewjasper committed Nov 27, 2019
1 parent 1f850f6 commit df625bd
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/test/ui/async-await/issues/issue-66695-static-refs.rs
@@ -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 => (),
_ => (),
}
};
}

0 comments on commit df625bd

Please sign in to comment.