diff options
| author | bors <bors@rust-lang.org> | 2023-12-12 06:23:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-12 06:23:03 +0000 |
| commit | 1c15b82b8a3c6fc36cf0f20bbf33a2e316be1e80 (patch) | |
| tree | a519de7ad16b91715b22ed067c64b401df787736 /compiler/rustc_errors/src | |
| parent | 5f5d2486022ad81e999d1135ad850c4085c65bd4 (diff) | |
| parent | dae76b772d0a4ffbb0e89b1cb88792df71bbf49d (diff) | |
| download | rust-1c15b82b8a3c6fc36cf0f20bbf33a2e316be1e80.tar.gz rust-1c15b82b8a3c6fc36cf0f20bbf33a2e316be1e80.zip | |
Auto merge of #118857 - matthiaskrgr:rollup-t02kx2u, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #118445 (Let `reuse` look inside git submodules) - #118756 (use bold magenta instead of bold white for highlighting) - #118797 (End locals' live range before suspending coroutine) - #118840 (remove some redundant clones) - #118844 (Monomorphize args while building Instance body in StableMIR) - #118846 (Fix BinOp `ty()` assertion and `fn_sig()` for closures) - #118848 (Add myself back to review rotation) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/emitter.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index ba9cd02a9ec..3f257fdd9cf 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -2674,6 +2674,14 @@ fn from_stderr(color: ColorConfig) -> Destination { } } +/// On Windows, BRIGHT_BLUE is hard to read on black. Use cyan instead. +/// +/// See #36178. +#[cfg(windows)] +const BRIGHT_BLUE: Color = Color::Cyan; +#[cfg(not(windows))] +const BRIGHT_BLUE: Color = Color::Blue; + impl Style { fn color_spec(&self, lvl: Level) -> ColorSpec { let mut spec = ColorSpec::new(); @@ -2688,11 +2696,7 @@ impl Style { Style::LineNumber => { spec.set_bold(true); spec.set_intense(true); - if cfg!(windows) { - spec.set_fg(Some(Color::Cyan)); - } else { - spec.set_fg(Some(Color::Blue)); - } + spec.set_fg(Some(BRIGHT_BLUE)); } Style::Quotation => {} Style::MainHeaderMsg => { @@ -2707,11 +2711,7 @@ impl Style { } Style::UnderlineSecondary | Style::LabelSecondary => { spec.set_bold(true).set_intense(true); - if cfg!(windows) { - spec.set_fg(Some(Color::Cyan)); - } else { - spec.set_fg(Some(Color::Blue)); - } + spec.set_fg(Some(BRIGHT_BLUE)); } Style::HeaderMsg | Style::NoStyle => {} Style::Level(lvl) => { @@ -2719,7 +2719,7 @@ impl Style { spec.set_bold(true); } Style::Highlight => { - spec.set_bold(true); + spec.set_bold(true).set_fg(Some(Color::Magenta)); } } spec |
