Skip to content

Commit

Permalink
Do not bold main message in --error-format=short
Browse files Browse the repository at this point in the history
Fix #63835.
  • Loading branch information
estebank committed Oct 19, 2023
1 parent cc705b8 commit fd49590
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion compiler/rustc_errors/src/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fd49590

Please sign in to comment.