This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
compiler/rustc_errors/src Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -2674,6 +2674,14 @@ fn from_stderr(color: ColorConfig) -> Destination {
26742674 }
26752675}
26762676
2677+ /// On Windows, BRIGHT_BLUE is hard to read on black. Use cyan instead.
2678+ ///
2679+ /// See #36178.
2680+ #[ cfg( windows) ]
2681+ const BRIGHT_BLUE : Color = Color :: Cyan ;
2682+ #[ cfg( not( windows) ) ]
2683+ const BRIGHT_BLUE : Color = Color :: Blue ;
2684+
26772685impl Style {
26782686 fn color_spec ( & self , lvl : Level ) -> ColorSpec {
26792687 let mut spec = ColorSpec :: new ( ) ;
@@ -2688,11 +2696,7 @@ impl Style {
26882696 Style :: LineNumber => {
26892697 spec. set_bold ( true ) ;
26902698 spec. set_intense ( true ) ;
2691- if cfg ! ( windows) {
2692- spec. set_fg ( Some ( Color :: Cyan ) ) ;
2693- } else {
2694- spec. set_fg ( Some ( Color :: Blue ) ) ;
2695- }
2699+ spec. set_fg ( Some ( BRIGHT_BLUE ) ) ;
26962700 }
26972701 Style :: Quotation => { }
26982702 Style :: MainHeaderMsg => {
@@ -2707,11 +2711,7 @@ impl Style {
27072711 }
27082712 Style :: UnderlineSecondary | Style :: LabelSecondary => {
27092713 spec. set_bold ( true ) . set_intense ( true ) ;
2710- if cfg ! ( windows) {
2711- spec. set_fg ( Some ( Color :: Cyan ) ) ;
2712- } else {
2713- spec. set_fg ( Some ( Color :: Blue ) ) ;
2714- }
2714+ spec. set_fg ( Some ( BRIGHT_BLUE ) ) ;
27152715 }
27162716 Style :: HeaderMsg | Style :: NoStyle => { }
27172717 Style :: Level ( lvl) => {
You can’t perform that action at this time.
0 commit comments