diff options
| author | topecongiro <seuchida@gmail.com> | 2017-06-13 09:18:14 +0900 |
|---|---|---|
| committer | topecongiro <seuchida@gmail.com> | 2017-06-13 09:18:14 +0900 |
| commit | 6e3394e6352ecb7dfdb7c248f4ceed9f9d11b763 (patch) | |
| tree | bc9d40a15b374d5f99622c1a34c56f43589d183e | |
| parent | 6ed3077651f6e6672df922181a7f5ce5289c74e1 (diff) | |
Use with_emitter instead of with_tty_emitter
| -rw-r--r-- | src/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs index 6488c83e983..219e98ef1e6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -460,8 +460,9 @@ fn format_ast<F>(krate: &ast::Crate, } // Reset the error count. if parse_session.span_diagnostic.has_errors() { - parse_session.span_diagnostic = - Handler::with_tty_emitter(ColorConfig::Auto, true, false, Some(codemap.clone())); + let silent_emitter = Box::new(EmitterWriter::new(Box::new(Vec::new()), + Some(codemap.clone()))); + parse_session.span_diagnostic = Handler::with_emitter(true, false, silent_emitter); } } |
