2019-07-26 16:54:25 -05:00
|
|
|
// run-pass
|
|
|
|
|
2019-05-09 20:13:40 -05:00
|
|
|
#![feature(generators)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let a = || {
|
|
|
|
{
|
|
|
|
let w: i32 = 4;
|
|
|
|
yield;
|
|
|
|
println!("{:?}", w);
|
|
|
|
}
|
|
|
|
{
|
|
|
|
let x: i32 = 5;
|
|
|
|
yield;
|
|
|
|
println!("{:?}", x);
|
|
|
|
}
|
|
|
|
{
|
|
|
|
let y: i32 = 6;
|
|
|
|
yield;
|
|
|
|
println!("{:?}", y);
|
|
|
|
}
|
|
|
|
{
|
|
|
|
let z: i32 = 7;
|
|
|
|
yield;
|
|
|
|
println!("{:?}", z);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
assert_eq!(8, std::mem::size_of_val(&a));
|
|
|
|
}
|