Use with_emitter instead of with_tty_emitter
This commit is contained in:
parent
6ed3077651
commit
6e3394e635
1 changed files with 3 additions and 2 deletions
|
@ -460,8 +460,9 @@ fn format_ast<F>(krate: &ast::Crate,
|
||||||
}
|
}
|
||||||
// Reset the error count.
|
// Reset the error count.
|
||||||
if parse_session.span_diagnostic.has_errors() {
|
if parse_session.span_diagnostic.has_errors() {
|
||||||
parse_session.span_diagnostic =
|
let silent_emitter = Box::new(EmitterWriter::new(Box::new(Vec::new()),
|
||||||
Handler::with_tty_emitter(ColorConfig::Auto, true, false, Some(codemap.clone()));
|
Some(codemap.clone())));
|
||||||
|
parse_session.span_diagnostic = Handler::with_emitter(true, false, silent_emitter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue