Rollup merge of #118933 - nnethercote:cleanup-errors-even-more, r=compiler-errors
Cleanup errors handlers even more A sequel to #118587. r? `@compiler-errors`
This commit is contained in:
commit
9e872b7cd8
23 changed files with 117 additions and 113 deletions
|
@ -277,8 +277,8 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
|
|||
// "secondary" errors if they occurred.
|
||||
let secondary_errors = mem::take(&mut self.secondary_errors);
|
||||
if self.error_emitted.is_none() {
|
||||
for mut error in secondary_errors {
|
||||
self.tcx.sess.diagnostic().emit_diagnostic(&mut error);
|
||||
for error in secondary_errors {
|
||||
self.tcx.sess.diagnostic().emit_diagnostic(error);
|
||||
}
|
||||
} else {
|
||||
assert!(self.tcx.sess.has_errors().is_some());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue