Skip to content

Commit c0ac539

Browse files
committed
Reviewer requested changes
1 parent 4f97338 commit c0ac539

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustc/session/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,13 @@ impl Session {
179179
pub fn track_errors<F, T>(&self, f: F) -> Result<T, usize>
180180
where F: FnOnce() -> T
181181
{
182-
let count = self.err_count();
182+
let old_count = self.err_count();
183183
let result = f();
184-
let count = self.err_count() - count;
185-
if count == 0 {
184+
let errors = self.err_count() - old_count;
185+
if errors == 0 {
186186
Ok(result)
187187
} else {
188-
Err(count)
188+
Err(errors)
189189
}
190190
}
191191
pub fn span_warn<S: Into<MultiSpan>>(&self, sp: S, msg: &str) {

0 commit comments

Comments
 (0)