use let chains in mir, resolve, target

This commit is contained in:
Kivooeo
2025-07-26 06:22:20 +05:00
parent bae38bad78
commit b8eb046e6e
28 changed files with 415 additions and 448 deletions

View File

@@ -1178,12 +1178,11 @@ fn collect_and_partition_mono_items(tcx: TyCtxt<'_>, (): ()) -> MonoItemPartitio
let autodiff_items = tcx.arena.alloc_from_iter(autodiff_items);
// Output monomorphization stats per def_id
if let SwitchWithOptPath::Enabled(ref path) = tcx.sess.opts.unstable_opts.dump_mono_stats {
if let Err(err) =
if let SwitchWithOptPath::Enabled(ref path) = tcx.sess.opts.unstable_opts.dump_mono_stats
&& let Err(err) =
dump_mono_items_stats(tcx, codegen_units, path, tcx.crate_name(LOCAL_CRATE))
{
tcx.dcx().emit_fatal(CouldntDumpMonoStats { error: err.to_string() });
}
{
tcx.dcx().emit_fatal(CouldntDumpMonoStats { error: err.to_string() });
}
if tcx.sess.opts.unstable_opts.print_mono_items {