mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +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.
|
||||
let err =
|
||||
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() {
|
||||
errors_buffer.sort_by_key(|diag| diag.span.primary_span());
|
||||
for diag in errors_buffer {
|
||||
self.tcx().dcx().emit_diagnostic(diag);
|
||||
for err in errors_buffer {
|
||||
err.emit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user