summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-02-28 11:37:04 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-02-28 11:37:04 -0800
commit324547140e0b67b109b43dfa79cc39cdf06151e5 (patch)
tree961e5a21bcf963ae184d7de40ab44bb84dfdff1a /src/libsyntax/parse
parent9b1be3d182e361697117bf79fadca7697f8b5aec (diff)
downloadrust-324547140e0b67b109b43dfa79cc39cdf06151e5.tar.gz
rust-324547140e0b67b109b43dfa79cc39cdf06151e5.zip
syntax: Refactor diagnostics to focus on Writers
This commit alters the diagnostic emission machinery to be focused around a
Writer for emitting errors. This allows it to not hard-code emission of errors
to stderr (useful for other applications).
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index 9d0c9d0f4d3..2d1c327ec3d 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -14,7 +14,7 @@
 use ast;
 use codemap::{Span, CodeMap, FileMap};
 use codemap;
-use diagnostic::{SpanHandler, mk_span_handler, mk_handler};
+use diagnostic::{SpanHandler, mk_span_handler, default_handler};
 use parse::attr::ParserAttr;
 use parse::parser::Parser;
 
@@ -49,7 +49,7 @@ pub fn new_parse_sess() -> @ParseSess {
     let cm = @CodeMap::new();
     @ParseSess {
         cm: cm,
-        span_diagnostic: mk_span_handler(mk_handler(), cm),
+        span_diagnostic: mk_span_handler(default_handler(), cm),
         included_mod_stack: RefCell::new(~[]),
     }
 }