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.
err_count()
1 parent 49ca3d9 commit 5ff06fbCopy full SHA for 5ff06fb
compiler/rustc_session/src/session.rs
@@ -450,8 +450,7 @@ impl Session {
450
{
451
let old_count = self.err_count();
452
let result = f();
453
- let errors = self.err_count() - old_count;
454
- if errors == 0 { Ok(result) } else { Err(ErrorReported) }
+ if self.err_count() == old_count { Ok(result) } else { Err(ErrorReported) }
455
}
456
pub fn span_warn<S: Into<MultiSpan>>(&self, sp: S, msg: &str) {
457
self.diagnostic().span_warn(sp, msg)
0 commit comments