rust/compiler/rustc_ast/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
..
attr Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
expand Generate better function argument names in global_allocator expansion 2023-08-06 07:36:05 -07:00
util Add gen blocks to ast and do some broken ast lowering 2023-10-27 13:05:48 +00:00
ast_traits.rs Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
ast.rs Auto merge of #116447 - oli-obk:gen_fn, r=compiler-errors 2023-10-29 00:03:52 +00:00
entry.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
format.rs get auto traits for parallel rustc 2023-08-02 16:21:45 +08:00
lib.rs use visibility to check unused imports and delete some stmts 2023-10-22 21:27:46 +08:00
mut_visit.rs Add gen blocks to ast and do some broken ast lowering 2023-10-27 13:05:48 +00:00
node_id.rs Various minor Idx-related tweaks 2023-04-16 02:42:50 -07:00
ptr.rs make rustc compilable 2023-04-16 07:25:13 +00:00
token.rs Reserve gen keyword for gen {} blocks and gen fn in 2024 edition 2023-10-26 06:49:17 +00:00
tokenstream.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
visit.rs Add gen blocks to ast and do some broken ast lowering 2023-10-27 13:05:48 +00:00