Skip to content

Commit 096ed00

Browse files
committed
Fix errors::Handler::cancel() to *decrease* the error count instead of increasing it.
1 parent 298730e commit 096ed00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libsyntax/errors/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ impl Handler {
499499
pub fn cancel(&mut self, err: &mut DiagnosticBuilder) {
500500
if err.level == Level::Error || err.level == Level::Fatal {
501501
assert!(self.has_errors());
502-
self.err_count.set(self.err_count.get() + 1);
502+
self.err_count.set(self.err_count.get() - 1);
503503
}
504504
err.cancel();
505505
}

0 commit comments

Comments
 (0)