Add an --output option for specifying an error emitter
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user