From b7676f2df5e1ff97e0baa3f7e70936d4bd4dacb5 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Thu, 8 May 2014 13:10:03 +0000 Subject: Add compiler flag to configure output coloring This adds the flag --color, which allows the user to force coloring or turn it off. The default behavior stays the same as before (colorize, if output goes to tty). Why this is beneficial is explained in issue #12881. Please note that this commit doesn't include any regression tests. I thought about how I'd write a test for this and it doesn't seem to be worth the effort to me for a UI change like this. Fixes #12881. --- src/libsyntax/parse/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 28f235a3da0..d8a9f69e293 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -13,7 +13,7 @@ use ast; use codemap::{Span, CodeMap, FileMap}; -use diagnostic::{SpanHandler, mk_span_handler, default_handler}; +use diagnostic::{SpanHandler, mk_span_handler, default_handler, Auto}; use parse::attr::ParserAttr; use parse::parser::Parser; @@ -41,7 +41,7 @@ pub struct ParseSess { pub fn new_parse_sess() -> ParseSess { ParseSess { - span_diagnostic: mk_span_handler(default_handler(), CodeMap::new()), + span_diagnostic: mk_span_handler(default_handler(Auto), CodeMap::new()), included_mod_stack: RefCell::new(Vec::new()), } } -- cgit 1.4.1-3-g733a5