Skip to content

Commit

Permalink
use if cfg instead of #[cfg]
Browse files Browse the repository at this point in the history
this pr is specifically for waffle because i love it <3
  • Loading branch information
jyn514 committed Dec 15, 2023
1 parent e6707df commit 4845665
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
@@ -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 {

0 comments on commit 4845665

Please sign in to comment.