Add an --output option for specifying an error emitter

This commit is contained in:
Nick Cameron
2015-12-31 16:50:06 +13:00
parent acfccc515b
commit fd46c78f8f
12 changed files with 135 additions and 81 deletions

View File

@@ -43,7 +43,7 @@ pub trait Emitter {
/// maximum number of lines we will print for each error; arbitrary.
const MAX_LINES: usize = 6;
#[derive(Clone, Copy)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ColorConfig {
Auto,
Always,

View File

@@ -276,6 +276,7 @@ pub struct Handler {
}
impl Handler {
// TODO remove
pub fn new(color_config: ColorConfig,
registry: Option<diagnostics::registry::Registry>,
can_emit_warnings: bool,