about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-03-27 10:13:43 +0100
committerGitHub <noreply@github.com>2024-03-27 10:13:43 +0100
commitbffeb052d1de036e6cc11db1c80b7b07e50d90d8 (patch)
treeba3ebc5f9317712f54c893f47a8855f1ec63161a /compiler/rustc_pattern_analysis/src
parent8a7f285cbc6a6878a359572d751b665a316f3b16 (diff)
parent9bda9ac76e8d232c6cf0efde55dace718c1d428c (diff)
downloadrust-bffeb052d1de036e6cc11db1c80b7b07e50d90d8.tar.gz
rust-bffeb052d1de036e6cc11db1c80b7b07e50d90d8.zip
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.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions