Skip to content

Commit 185a0e5

Browse files
committed
Reviewer requested changes and test fixes
1 parent 4f97338 commit 185a0e5

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
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) {

src/librustc_driver/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ fn test_env<F>(source_string: &str,
132132
ty::ctxt::create_and_enter(&sess,
133133
&arenas,
134134
def_map,
135-
named_region_map,
135+
named_region_map.unwrap(),
136136
ast_map,
137137
freevars,
138138
region_map,

src/librustdoc/core.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ pub fn run_core(search_paths: SearchPaths, cfgs: Vec<String>, externs: Externs,
153153
&arenas,
154154
&name,
155155
resolve::MakeGlobMap::No,
156-
|tcx, _, analysis| {
156+
|tcx, _, analysis, _| {
157157
let _ignore = tcx.dep_graph.in_ignore();
158158
let ty::CrateAnalysis { access_levels, .. } = analysis;
159159

src/test/run-make/execution-engine/test.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ fn compile_program(input: &str, sysroot: PathBuf)
242242

243243
abort_on_err(driver::phase_3_run_analysis_passes(
244244
&sess, &cstore, ast_map, &arenas, &id,
245-
MakeGlobMap::No, |tcx, mir_map, analysis| {
245+
MakeGlobMap::No, |tcx, mir_map, analysis, _| {
246246

247-
let trans = driver::phase_4_translate_to_llvm(tcx, mir_map, analysis);
247+
let trans = driver::phase_4_translate_to_llvm(tcx, mir_map.unwrap(), analysis);
248248

249249
let crates = tcx.sess.cstore.used_crates(LinkagePreference::RequireDynamic);
250250

0 commit comments

Comments
 (0)