Skip to content

Commit fd49590

Browse files
committed
Do not bold main message in --error-format=short
Fix #63835.
1 parent cc705b8 commit fd49590

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

compiler/rustc_errors/src/emitter.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,14 @@ impl EmitterWriter {
13481348
buffer.append(0, "]", Style::Level(*level));
13491349
label_width += 2 + code.len();
13501350
}
1351-
let header_style = if is_secondary { Style::HeaderMsg } else { Style::MainHeaderMsg };
1351+
let header_style = if is_secondary {
1352+
Style::HeaderMsg
1353+
} else if self.short_message {
1354+
// For short messages avoid bolding the message, as it doesn't look great (#63835).
1355+
Style::NoStyle
1356+
} else {
1357+
Style::MainHeaderMsg
1358+
};
13521359
if *level != Level::FailureNote {
13531360
buffer.append(0, ": ", header_style);
13541361
label_width += 2;

0 commit comments

Comments
 (0)