Some work
This commit is contained in:
parent
23018a55d9
commit
6bdb4e3206
7 changed files with 42 additions and 19 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue