syn
syn copied to clipboard
Parse `gen` blocks and functions
Tracking issue: https://github.com/rust-lang/rust/issues/117078
fn moved() -> impl Iterator<Item = u32> {
let mut x = "foo".to_string();
gen move {
yield 42;
if x == "foo" { return }
x.clear();
for x in 3..6 { yield x }
}
}