about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/passes.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-08-08 14:10:54 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2025-08-08 14:51:24 +1000
commit0239e464876c8785e8601712220f17d9c58bcba6 (patch)
tree90c1bef000597778206e9d3ee0bbd46a620fca88 /compiler/rustc_interface/src/passes.rs
parent347cd4e6cb8a189c12a89e89a3951a5b1043308c (diff)
downloadrust-0239e464876c8785e8601712220f17d9c58bcba6.tar.gz
rust-0239e464876c8785e8601712220f17d9c58bcba6.zip
Fix some bad formatting in `-Zmacro-stats` output.
I also double-checked that everything looks good on some real-world
crates.
Diffstat (limited to 'compiler/rustc_interface/src/passes.rs')
-rw-r--r--compiler/rustc_interface/src/passes.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs
index 8dec8069bc7..8bbd0e61492 100644
--- a/compiler/rustc_interface/src/passes.rs
+++ b/compiler/rustc_interface/src/passes.rs
@@ -371,7 +371,7 @@ fn print_macro_stats(ecx: &ExtCtxt<'_>) {
             // The name won't abut or overlap with the uses value, but it does
             // overlap with the empty part of the uses column. Shrink the width
             // of the uses column to account for the excess name length.
-            uses_w = uses_with_underscores.len() + 1
+            uses_w -= name.len() - name_w;
         };
 
         _ = writeln!(