From af8d911d63d6b38ea2da36a330b035dd2e6f89a7 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Wed, 11 Sep 2024 17:23:56 -0400 Subject: Also fix if in else --- compiler/rustc_middle/src/mir/pretty.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'compiler/rustc_middle/src') diff --git a/compiler/rustc_middle/src/mir/pretty.rs b/compiler/rustc_middle/src/mir/pretty.rs index a98e6943d68..d66d0be1009 100644 --- a/compiler/rustc_middle/src/mir/pretty.rs +++ b/compiler/rustc_middle/src/mir/pretty.rs @@ -208,12 +208,10 @@ fn dump_path<'tcx>( let pass_num = if tcx.sess.opts.unstable_opts.dump_mir_exclude_pass_number { String::new() + } else if pass_num { + format!(".{:03}-{:03}", body.phase.phase_index(), body.pass_count) } else { - if pass_num { - format!(".{:03}-{:03}", body.phase.phase_index(), body.pass_count) - } else { - ".-------".to_string() - } + ".-------".to_string() }; let crate_name = tcx.crate_name(source.def_id().krate); -- cgit 1.4.1-3-g733a5