about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-09-17 17:28:32 +0200
committerGitHub <noreply@github.com>2024-09-17 17:28:32 +0200
commitddcb9c132a505c5c5ad9ec3d5eb488f739584774 (patch)
tree4e6e35aa262e20db96b1c39e05dedb8eb03357fa /compiler/rustc_codegen_llvm/src/errors.rs
parent732ad597795618eb436319abe408fb3a976448ec (diff)
parent4beb1cf9e53102ad32793127316f0045a9c004f3 (diff)
downloadrust-ddcb9c132a505c5c5ad9ec3d5eb488f739584774.tar.gz
rust-ddcb9c132a505c5c5ad9ec3d5eb488f739584774.zip
Rollup merge of #130201 - compiler-errors:foreign-synthetic-body, r=lcnr
Encode `coroutine_by_move_body_def_id` in crate metadata

We synthesize the MIR for a by-move body for the `FnOnce` implementation of async closures. It can be accessed with the `coroutine_by_move_body_def_id` query. We weren't encoding this query in the metadata though, nor were we properly recording that synthetic MIR in `mir_keys`, so the `optimized_mir` wasn't getting encoded either!

Stacked on top is a fix to consider `DefKind::SyntheticCoroutineBody` to return true in several places I missed. Specifically, we should consider the def-kind in `fn DefKind::is_fn_like()`, since that's what we were using to make sure we ensure `query mir_inliner_callees` before the MIR gets stolen for the body. This led to some CI failures that were caught by miri but which I added a test for.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions