2021-12-16 14:07:36 -06:00
|
|
|
//@ build-pass
|
|
|
|
|
2024-04-11 08:15:34 -05:00
|
|
|
#![feature(coroutines, stmt_expr_attributes)]
|
2021-12-16 14:07:36 -06:00
|
|
|
#![allow(unused_assignments, dead_code)]
|
|
|
|
|
|
|
|
fn main() {
|
2024-04-11 08:15:34 -05:00
|
|
|
let _ = #[coroutine]
|
|
|
|
|| {
|
2021-12-16 14:07:36 -06:00
|
|
|
let mut x = vec![22_usize];
|
|
|
|
std::mem::drop(x);
|
|
|
|
match y() {
|
|
|
|
true if {
|
|
|
|
x = vec![];
|
|
|
|
false
|
|
|
|
} => {}
|
|
|
|
_ => {
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
fn y() -> bool {
|
|
|
|
true
|
|
|
|
}
|