diff options
| author | Hanno Braun <mail@hannobraun.de> | 2014-05-08 13:10:03 +0000 |
|---|---|---|
| committer | Hanno Braun <mail@hannobraun.de> | 2014-05-15 13:12:53 +0000 |
| commit | b7676f2df5e1ff97e0baa3f7e70936d4bd4dacb5 (patch) | |
| tree | a70df2c0d394b84d3741321d22bc91888a75d541 /src/libsyntax/parse | |
| parent | 579e0a5f5555ed926cf9378ef61b034b0c316e76 (diff) | |
| download | rust-b7676f2df5e1ff97e0baa3f7e70936d4bd4dacb5.tar.gz rust-b7676f2df5e1ff97e0baa3f7e70936d4bd4dacb5.zip | |
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.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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()), } } |
