rust/compiler/rustc_const_eval/src
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
..
const_eval Auto merge of #119146 - nnethercote:rm-DiagCtxt-api-duplication, r=compiler-errors 2023-12-26 02:24:39 +00:00
interpret Auto merge of #119146 - nnethercote:rm-DiagCtxt-api-duplication, r=compiler-errors 2023-12-26 02:24:39 +00:00
transform Auto merge of #119258 - compiler-errors:closure-kind, r=eholk 2023-12-26 04:25:53 +00:00
util Revert "Don't print host effect param in pretty path_generic_args" 2023-12-10 10:17:28 +00:00
errors.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
lib.rs Use rustc_fluent_macro::fluent_messages! directly. 2023-11-26 08:38:40 +11:00