Rollup merge of #101165 - ldm0:drain_to_iter, r=cjgillot
Use more `into_iter` rather than `drain(..)` Clearer semantic.
This commit is contained in:
commit
e5356712b9
6 changed files with 16 additions and 16 deletions
|
@ -501,7 +501,7 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
|
|||
|
||||
if !errors_buffer.is_empty() {
|
||||
errors_buffer.sort_by_key(|diag| diag.span.primary_span());
|
||||
for mut diag in errors_buffer.drain(..) {
|
||||
for mut diag in errors_buffer {
|
||||
self.tcx().sess.diagnostic().emit_diagnostic(&mut diag);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue