syn icon indicating copy to clipboard operation
syn copied to clipboard

Parse `gen` blocks and functions

Open dtolnay opened this issue 2 years ago • 0 comments

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 }
    }
}

dtolnay avatar Nov 05 '23 21:11 dtolnay