diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2016-09-27 11:45:50 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2016-09-28 16:20:30 +1300 |
| commit | e8a4db25acde9d2d23a4ebfb464d283d495b5b8d (patch) | |
| tree | 5f299d1e451fbdf7377ad9e10eae6cee5e071e51 /src/librustc_errors | |
| parent | 322b5530ba8a74e0363243da5cdc3d0ac43762d7 (diff) | |
| download | rust-e8a4db25acde9d2d23a4ebfb464d283d495b5b8d.tar.gz rust-e8a4db25acde9d2d23a4ebfb464d283d495b5b8d.zip | |
Allow supplying an error destination via the compiler driver
Allows replacing stderr with a buffer from the client. Also, some refactoring around run_compiler.
Diffstat (limited to 'src/librustc_errors')
| -rw-r--r-- | src/librustc_errors/emitter.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index 6456b72dfb5..1d7ff45b3b8 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -99,8 +99,10 @@ impl EmitterWriter { pub fn new(dst: Box<Write + Send>, code_map: Option<Rc<CodeMapper>>) -> EmitterWriter { - EmitterWriter { dst: Raw(dst), - cm: code_map} + EmitterWriter { + dst: Raw(dst), + cm: code_map, + } } fn preprocess_annotations(&self, msp: &MultiSpan) -> Vec<FileWithAnnotatedLines> { |
