1
Fork 0

Implement JSON error emission

[breaking-change]

syntax::errors::Handler::new has been renamed to with_tty_emitter

Many functions which used to take a syntax::errors::ColorConfig, now take a rustc::session::config::ErrorOutputType. If you previously used ColorConfig::Auto as a default, you should now use ErrorOutputType::default().
This commit is contained in:
Nick Cameron 2015-12-31 18:47:14 +13:00
parent fd46c78f8f
commit b976d9e666
4 changed files with 214 additions and 31 deletions

View file

@ -49,7 +49,7 @@ pub struct ParseSess {
impl ParseSess {
pub fn new() -> ParseSess {
let cm = Rc::new(CodeMap::new());
let handler = Handler::new(ColorConfig::Auto, None, true, false, cm.clone());
let handler = Handler::with_tty_emitter(ColorConfig::Auto, None, true, false, cm.clone());
ParseSess::with_span_handler(handler, cm)
}