From e8a4db25acde9d2d23a4ebfb464d283d495b5b8d Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Tue, 27 Sep 2016 11:45:50 +1300 Subject: Allow supplying an error destination via the compiler driver Allows replacing stderr with a buffer from the client. Also, some refactoring around run_compiler. --- src/librustc_errors/emitter.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/librustc_errors') 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, code_map: Option>) -> EmitterWriter { - EmitterWriter { dst: Raw(dst), - cm: code_map} + EmitterWriter { + dst: Raw(dst), + cm: code_map, + } } fn preprocess_annotations(&self, msp: &MultiSpan) -> Vec { -- cgit 1.4.1-3-g733a5