+ let emitter: Box<Emitter> = match sopts.error_format {
+ config::ErrorOutputType::HumanReadable(color_config) => {
+ Box::new(EmitterWriter::stderr(color_config, Some(registry), codemap.clone()))
+ }
+ config::ErrorOutputType::Json => {
+ Box::new(JsonEmitter::stderr(Some(registry), codemap.clone()))
+ }
+ };
+