Skip to content

Commit

Permalink
Auto merge of #31257 - tmiasko:track-errors-fix, r=nikomatsakis
Browse files Browse the repository at this point in the history
r? @nrc
  • Loading branch information
bors committed Jan 28, 2016
2 parents 10de882 + b3e30b5 commit 552bf75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ impl Session {
pub fn track_errors<F, T>(&self, f: F) -> Result<T, usize>
where F: FnOnce() -> T
{
let mut count = self.err_count();
let count = self.err_count();
let result = f();
count -= self.err_count();
let count = self.err_count() - count;
if count == 0 {
Ok(result)
} else {
Expand Down

0 comments on commit 552bf75

Please sign in to comment.