Skip to content

Commit 411607b

Browse files
committed
tests: remove some trailing ws
1 parent 6acb9e7 commit 411607b

19 files changed

+60
-50
lines changed

compiler/rustc_errors/src/emitter.rs

+13-3
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ impl HumanEmitter {
984984
// 4 | }
985985
// |
986986
for pos in 0..=line_len {
987-
draw_col_separator(buffer, line_offset + pos + 1, width_offset - 2);
987+
draw_col_separator_no_space(buffer, line_offset + pos + 1, width_offset - 2);
988988
}
989989

990990
// Write the horizontal lines for multiline annotations
@@ -2260,13 +2260,23 @@ impl HumanEmitter {
22602260
buffer.puts(*row_num, max_line_num_len + 1, "+ ", Style::Addition);
22612261
}
22622262
[] => {
2263-
draw_col_separator(buffer, *row_num, max_line_num_len + 1);
2263+
draw_col_separator_no_space(buffer, *row_num, max_line_num_len + 1);
22642264
}
22652265
_ => {
22662266
buffer.puts(*row_num, max_line_num_len + 1, "~ ", Style::Addition);
22672267
}
22682268
}
2269-
buffer.append(*row_num, &normalize_whitespace(line_to_add), Style::NoStyle);
2269+
// LL | line_to_add
2270+
// ++^^^
2271+
// | |
2272+
// | magic `3`
2273+
// `max_line_num_len`
2274+
buffer.puts(
2275+
*row_num,
2276+
max_line_num_len + 3,
2277+
&normalize_whitespace(line_to_add),
2278+
Style::NoStyle,
2279+
);
22702280
} else if let DisplaySuggestion::Add = show_code_change {
22712281
buffer.puts(*row_num, 0, &self.maybe_anonymized(line_num), Style::LineNumber);
22722282
buffer.puts(*row_num, max_line_num_len + 1, "+ ", Style::Addition);

tests/ui/codemap_tests/huge_multispan_highlight.svg

+10-10
Loading

tests/ui/error-emitter/highlighting.svg

+5-5
Loading

tests/ui/error-emitter/highlighting.windows.svg

+5-5
Loading

0 commit comments

Comments
 (0)