rust/compiler/rustc_const_eval/src
Guillaume Gomez bffeb052d1
Rollup merge of #123021 - compiler-errors:coroutine-layout-lol, r=oli-obk
Make `TyCtxt::coroutine_layout` take coroutine's kind parameter

For coroutines that come from coroutine-closures (i.e. async closures), we may have two kinds of bodies stored in the coroutine; one that takes the closure's captures by reference, and one that takes the captures by move.

These currently have identical layouts, but if we do any optimization for these layouts that are related to the upvars, then they will diverge -- e.g. https://github.com/rust-lang/rust/pull/120168#discussion_r1536943728.

This PR relaxes the assertion I added in #121122, and instead make the `TyCtxt::coroutine_layout` method take the `coroutine_kind_ty` argument from the coroutine, which will allow us to differentiate these by-move and by-ref bodies.
2024-03-27 10:13:43 +01:00
..
const_eval Auto merge of #111769 - saethlin:ctfe-backtrace-ctrlc, r=RalfJung 2024-03-26 00:04:03 +00:00
interpret Auto merge of #122629 - RalfJung:assert-unsafe-precondition, r=saethlin 2024-03-23 21:11:00 +00:00
transform Relax validation now 2024-03-24 21:15:23 -04:00
util Programmatically convert some of the pat ctors 2024-03-22 11:13:29 -04:00
errors.rs Print a backtrace in const eval if interrupted 2024-03-17 11:55:20 -04:00
lib.rs Auto merge of #111769 - saethlin:ctfe-backtrace-ctrlc, r=RalfJung 2024-03-26 00:04:03 +00:00