From 250c713c9350f77cbc36d6ac9a9a7209ba0f4b98 Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Wed, 23 Jul 2025 04:04:23 -0600 Subject: [PATCH] fix!: Don't auto-add padding between Origin and Message --- src/renderer/mod.rs | 24 ++++++++---------------- tests/rustc_tests.rs | 1 - 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index 459e672..671ca25 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -390,6 +390,14 @@ impl Renderer { is_first, buffer_msg_line_offset, ); + let current_line = buffer.num_lines(); + if g == 0 && peek.is_none() && group_len > 1 { + self.draw_col_separator_end( + &mut buffer, + current_line, + max_line_num_len + 1, + ); + } } Element::Padding(_) => { let current_line = buffer.num_lines(); @@ -408,22 +416,6 @@ impl Renderer { } } } - if g == 0 && matches!(section, Element::Origin(_)) { - let current_line = buffer.num_lines(); - if peek.is_none() && group_len > 1 { - self.draw_col_separator_end( - &mut buffer, - current_line, - max_line_num_len + 1, - ); - } else if matches!(peek, Some(Element::Message(_))) { - self.draw_col_separator_no_space( - &mut buffer, - current_line, - max_line_num_len + 1, - ); - } - } } buffer .render(&level, &self.stylesheet, &mut out_string) diff --git a/tests/rustc_tests.rs b/tests/rustc_tests.rs index 62daaaf..9a8682b 100644 --- a/tests/rustc_tests.rs +++ b/tests/rustc_tests.rs @@ -4614,7 +4614,6 @@ If your compilation actually takes a long time, you can safely allow the lint."; let expected = str![[r#" error: constant evaluation is taking a long time --> $SRC_DIR/core/src/num/mod.rs:1151:4 - | = note: this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval. If your compilation actually takes a long time, you can safely allow the lint. help: the constant being evaluated