rust/tests/ui/async-await/issues/issue-66695-static-refs.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
386 B
Rust
Raw Normal View History

2019-11-27 13:02:13 -06:00
// 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 => (),
_ => (),
}
};
}