We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
emit_stashed_diagnostics
1 parent 11f32b7 commit 3434466Copy full SHA for 3434466
compiler/rustc_errors/src/lib.rs
@@ -1224,9 +1224,8 @@ impl DiagCtxtInner {
1224
/// Emit all stashed diagnostics.
1225
fn emit_stashed_diagnostics(&mut self) -> Option<ErrorGuaranteed> {
1226
let has_errors = self.has_errors();
1227
- let diags = self.stashed_diagnostics.drain(..).map(|x| x.1).collect::<Vec<_>>();
1228
let mut reported = None;
1229
- for diag in diags {
+ for (_, diag) in std::mem::take(&mut self.stashed_diagnostics).into_iter() {
1230
// Decrement the count tracking the stash; emitting will increment it.
1231
if diag.is_error() {
1232
if diag.is_lint.is_some() {
0 commit comments