1
Fork 0

Change collect_and_partition_mono_items tuple return type to a struct

This commit is contained in:
Oli Scherer 2025-01-27 08:11:02 +00:00
parent 633a3fe36d
commit b24f674520
9 changed files with 33 additions and 21 deletions

View file

@ -676,7 +676,7 @@ pub(crate) fn run_aot(
.to_owned();
let cgus = if tcx.sess.opts.output_types.should_codegen() {
tcx.collect_and_partition_mono_items(()).1
tcx.collect_and_partition_mono_items(()).codegen_units
} else {
// If only `--emit metadata` is used, we shouldn't perform any codegen.
// Also `tcx.collect_and_partition_mono_items` may panic in that case.