rust/compiler/rustc_mir_transform
bors 1ab783112a Auto merge of #119258 - compiler-errors:closure-kind, r=eholk
Make closures carry their own ClosureKind

Right now, we use the "`movability`" field of `hir::Closure` to distinguish a closure and a coroutine. This is paired together with the `CoroutineKind`, which is located not in the `hir::Closure`, but the `hir::Body`. This is strange and redundant.

This PR introduces `ClosureKind` with two variants -- `Closure` and `Coroutine`, which is put into `hir::Closure`. The `CoroutineKind` is thus removed from `hir::Body`, and `Option<Movability>` no longer needs to be a stand-in for "is this a closure or a coroutine".

r? eholk
2023-12-26 04:25:53 +00:00
..
src Auto merge of #119258 - compiler-errors:closure-kind, r=eholk 2023-12-26 04:25:53 +00:00
Cargo.toml coverage: Avoid unnecessary macros in unit tests 2023-12-07 11:12:48 +11:00
messages.ftl Print list of missing target features when calling a function with target features outside an unsafe block 2023-11-27 19:13:11 +01:00