Skip to content

Commit

Permalink
Rollup merge of rust-lang#118993 - jyn514:cfg-color, r=WaffleLapkin,N…
Browse files Browse the repository at this point in the history
…ilstrieb

use `if cfg!` instead of `#[cfg]`

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

fixes rust-lang#118756 (comment)

r? `@WaffleLapkin`
  • Loading branch information
workingjubilee authored Dec 16, 2023
2 parents c7b492e + 4845665 commit 30231d9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions compiler/rustc_errors/src/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 30231d9

Please sign in to comment.