rust/compiler/rustc_ast_lowering/src
bors 2cad938a81 Auto merge of #116447 - oli-obk:gen_fn, r=compiler-errors
Implement `gen` blocks in the 2024 edition

Coroutines tracking issue https://github.com/rust-lang/rust/issues/43122
`gen` block tracking issue https://github.com/rust-lang/rust/issues/117078

This PR implements `gen` blocks that implement `Iterator`. Most of the logic with `async` blocks is shared, and thus I renamed various types that were referring to `async` specifically.

An example usage of `gen` blocks is

```rust
fn foo() -> impl Iterator<Item = i32> {
    gen {
        yield 42;
        for i in 5..18 {
            if i.is_even() { continue }
            yield i * 2;
        }
    }
}
```

The limitations (to be resolved) of the implementation are listed in the tracking issue
2023-10-29 00:03:52 +00:00
..
asm.rs lower impl const to bind to host effect param 2023-08-06 13:34:53 +00:00
block.rs rustc_ast_lowering: remove ref patterns 2022-11-22 18:49:29 +00:00
errors.rs s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
expr.rs Prevent generators from being movable 2023-10-27 13:05:49 +00:00
format.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
index.rs Don't hold the definitions' lock across index_hir 2023-09-02 08:13:07 +02:00
item.rs Rename AsyncCoroutineKind to CoroutineSource 2023-10-25 16:14:05 +00:00
lib.rs Deny providing explicit effect params 2023-10-26 08:24:25 +00:00
lifetime_collector.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
pat.rs lower impl const to bind to host effect param 2023-08-06 13:34:53 +00:00
path.rs lower impl const to bind to host effect param 2023-08-06 13:34:53 +00:00