let emitter: Box<Emitter> = match (sopts.error_format, emitter_dest) {
(config::ErrorOutputType::HumanReadable(color_config), None) => {
- Box::new(EmitterWriter::stderr(color_config, Some(codemap.clone()), false))
+ Box::new(EmitterWriter::stderr(color_config,
+ Some(codemap.clone()),
+ false,
+ sopts.debugging_opts.teach))
}
(config::ErrorOutputType::HumanReadable(_), Some(dst)) => {
- Box::new(EmitterWriter::new(dst, Some(codemap.clone()), false))
+ Box::new(EmitterWriter::new(dst, Some(codemap.clone()), false, false))
}
(config::ErrorOutputType::Json(pretty), None) => {
- Box::new(JsonEmitter::stderr(Some(registry), codemap.clone(), pretty))
+ Box::new(JsonEmitter::stderr(Some(registry), codemap.clone(),
+ pretty, sopts.debugging_opts.approximate_suggestions))
}
(config::ErrorOutputType::Json(pretty), Some(dst)) => {
- Box::new(JsonEmitter::new(dst, Some(registry), codemap.clone(), pretty))
+ Box::new(JsonEmitter::new(dst, Some(registry), codemap.clone(),
+ pretty, sopts.debugging_opts.approximate_suggestions))
}
(config::ErrorOutputType::Short(color_config), None) => {
- Box::new(EmitterWriter::stderr(color_config, Some(codemap.clone()), true))
+ Box::new(EmitterWriter::stderr(color_config, Some(codemap.clone()), true, false))
}
(config::ErrorOutputType::Short(_), Some(dst)) => {
- Box::new(EmitterWriter::new(dst, Some(codemap.clone()), true))
+ Box::new(EmitterWriter::new(dst, Some(codemap.clone()), true, false))
}
};