Some work
This commit is contained in:
@@ -145,10 +145,11 @@ impl Emitter for JsonEmitter {
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
let report = FutureIncompatReport { future_incompat_report: data };
|
||||
let result = if self.pretty {
|
||||
writeln!(&mut self.dst, "{}", as_pretty_json(&data))
|
||||
writeln!(&mut self.dst, "{}", as_pretty_json(&report))
|
||||
} else {
|
||||
writeln!(&mut self.dst, "{}", as_json(&data))
|
||||
writeln!(&mut self.dst, "{}", as_json(&report))
|
||||
}
|
||||
.and_then(|_| self.dst.flush());
|
||||
if let Err(e) = result {
|
||||
@@ -254,6 +255,11 @@ struct FutureBreakageItem {
|
||||
diagnostic: Diagnostic,
|
||||
}
|
||||
|
||||
#[derive(Encodable)]
|
||||
struct FutureIncompatReport {
|
||||
future_incompat_report: Vec<FutureBreakageItem>,
|
||||
}
|
||||
|
||||
impl Diagnostic {
|
||||
fn from_errors_diagnostic(diag: &crate::Diagnostic, je: &JsonEmitter) -> Diagnostic {
|
||||
let sugg = diag.suggestions.iter().map(|sugg| Diagnostic {
|
||||
|
||||
Reference in New Issue
Block a user