Skip to content

Commit 325936a

Browse files
committed
Do not render ascii colors to buffers
1 parent 776c8a3 commit 325936a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc/session/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,8 +1050,8 @@ fn default_emitter(
10501050
dst,
10511051
Some(source_map.clone()),
10521052
short,
1053-
false,
1054-
color_config.suggests_using_colors(),
1053+
false, // no teach messages when writing to a buffer
1054+
false, // no colors when writing to a buffer
10551055
),
10561056
};
10571057
Box::new(emitter.ui_testing(sopts.debugging_opts.ui_testing))

src/librustc_errors/emitter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl ColorConfig {
146146
ColorConfig::Auto => ColorChoice::Never,
147147
}
148148
}
149-
pub fn suggests_using_colors(self) -> bool {
149+
fn suggests_using_colors(self) -> bool {
150150
match self {
151151
| ColorConfig::Always
152152
| ColorConfig::Auto

0 commit comments

Comments
 (0)