Do not bold main message in --error-format=short

Fix #63835.
This commit is contained in:
Esteban Küber 2023-10-19 22:52:30 +00:00
parent cc705b8012
commit fd49590ee0

View File

@ -1348,7 +1348,14 @@ impl EmitterWriter {
buffer.append(0, "]", Style::Level(*level));
label_width += 2 + code.len();
}
let header_style = if is_secondary { Style::HeaderMsg } else { Style::MainHeaderMsg };
let header_style = if is_secondary {
Style::HeaderMsg
} else if self.short_message {
// For short messages avoid bolding the message, as it doesn't look great (#63835).
Style::NoStyle
} else {
Style::MainHeaderMsg
};
if *level != Level::FailureNote {
buffer.append(0, ": ", header_style);
label_width += 2;