about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorJubilee <46493976+workingjubilee@users.noreply.github.com>2023-12-15 21:32:59 -0800
committerGitHub <noreply@github.com>2023-12-15 21:32:59 -0800
commit30231d9afa66448077f4bc03b61bdfbec1d53f9a (patch)
treea2f56d5535a5020db4fd3b1e92697f2d80d6f8f8 /compiler/rustc_errors/src
parentc7b492eac1f059908c817d525554fa36c11eb206 (diff)
parent4845665f6a1b4c2614b7984c79d8a6a4241fa978 (diff)
downloadrust-30231d9afa66448077f4bc03b61bdfbec1d53f9a.tar.gz
rust-30231d9afa66448077f4bc03b61bdfbec1d53f9a.zip
Rollup merge of #118993 - jyn514:cfg-color, r=WaffleLapkin,Nilstrieb
use `if cfg!` instead of `#[cfg]`

this pr is specifically for waffle because i love it <3

fixes https://github.com/rust-lang/rust/pull/118756#discussion_r1421767649

r? `@WaffleLapkin`
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/emitter.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs
index 379883a0c18..ec37240e394 100644
--- a/compiler/rustc_errors/src/emitter.rs
+++ b/compiler/rustc_errors/src/emitter.rs
@@ -2677,10 +2677,7 @@ 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;
+const BRIGHT_BLUE: Color = if cfg!(windows) { Color::Cyan } else { Color::Blue };
 
 impl Style {
     fn color_spec(&self, lvl: Level) -> ColorSpec {