mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
Stop using DiagnosticBuilder::buffer
in WritebackCx
.
This commit is contained in:
parent
d5aafb846b
commit
2668270dfb
@ -498,14 +498,14 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
|
|||||||
// order when emitting them.
|
// order when emitting them.
|
||||||
let err =
|
let err =
|
||||||
self.tcx().dcx().struct_span_err(span, format!("user args: {user_args:?}"));
|
self.tcx().dcx().struct_span_err(span, format!("user args: {user_args:?}"));
|
||||||
err.buffer(&mut errors_buffer);
|
errors_buffer.push(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !errors_buffer.is_empty() {
|
if !errors_buffer.is_empty() {
|
||||||
errors_buffer.sort_by_key(|diag| diag.span.primary_span());
|
errors_buffer.sort_by_key(|diag| diag.span.primary_span());
|
||||||
for diag in errors_buffer {
|
for err in errors_buffer {
|
||||||
self.tcx().dcx().emit_diagnostic(diag);
|
err.emit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user