rust/compiler/rustc_ty_utils/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
..
abi.rs s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
assoc.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
common_traits.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
consts.rs Optimize some alloc_from_iter call sites. 2023-10-03 18:12:37 +11:00
errors.rs Re-use error code for duplicate error 2023-06-22 15:51:14 +00:00
implied_bounds.rs s/Generator/Coroutine/ 2023-10-20 21:10:38 +00:00
instance.rs Basic generators work 2023-10-27 13:05:48 +00:00
layout_sanity_check.rs fix failure to detect a too-big-type after adding padding 2023-10-27 18:07:53 +02:00
layout.rs s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
lib.rs Factor signature type walking out of opaque_types_defined_by 2023-10-23 16:55:26 +00:00
needs_drop.rs s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
opaque_types.rs Rollup merge of #117136 - compiler-errors:defid-list, r=oli-obk 2023-10-25 17:40:29 +02:00
representability.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
sig_types.rs Factor signature type walking out of opaque_types_defined_by 2023-10-23 16:55:26 +00:00
structural_match.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
ty.rs s/Generator/Coroutine/ 2023-10-20 21:10:38 +00:00