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:
parent
fd46c78f8f
commit
b976d9e666
4 changed files with 214 additions and 31 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue