2019-11-26 22:30:54 +00:00
|
|
|
//@ build-pass
|
2023-10-19 21:46:28 +00:00
|
|
|
#![feature(coroutines)]
|
2019-11-26 22:30:54 +00:00
|
|
|
|
|
|
|
static A: [i32; 5] = [1, 2, 3, 4, 5];
|
|
|
|
|
|
|
|
fn main() {
|
2024-04-11 13:15:34 +00:00
|
|
|
#[coroutine] static || {
|
2019-11-26 22:30:54 +00:00
|
|
|
let u = A[{yield; 1}];
|
|
|
|
};
|
2024-04-11 13:15:34 +00:00
|
|
|
#[coroutine] static || {
|
2019-11-26 22:30:54 +00:00
|
|
|
match A {
|
|
|
|
i if { yield; true } => (),
|
|
|
|
_ => (),
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|