Skip to content

Commit

Permalink
Unrolled build for rust-lang#118993
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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 rust-lang#118756 (comment)

r? `@WaffleLapkin`
  • Loading branch information
rust-timer authored Dec 16, 2023
2 parents 5c927ab + 4845665 commit 58c8e35
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 58c8e35

Please sign in to comment.