Skip to content

Commit

Permalink
Reviewer requested changes and test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nrc committed Feb 1, 2016
1 parent 4f97338 commit 185a0e5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/librustc/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ impl Session {
pub fn track_errors<F, T>(&self, f: F) -> Result<T, usize>
where F: FnOnce() -> T
{
let count = self.err_count();
let old_count = self.err_count();
let result = f();
let count = self.err_count() - count;
if count == 0 {
let errors = self.err_count() - old_count;
if errors == 0 {
Ok(result)
} else {
Err(count)
Err(errors)
}
}
pub fn span_warn<S: Into<MultiSpan>>(&self, sp: S, msg: &str) {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_driver/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ fn test_env<F>(source_string: &str,
ty::ctxt::create_and_enter(&sess,
&arenas,
def_map,
named_region_map,
named_region_map.unwrap(),
ast_map,
freevars,
region_map,
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ pub fn run_core(search_paths: SearchPaths, cfgs: Vec<String>, externs: Externs,
&arenas,
&name,
resolve::MakeGlobMap::No,
|tcx, _, analysis| {
|tcx, _, analysis, _| {
let _ignore = tcx.dep_graph.in_ignore();
let ty::CrateAnalysis { access_levels, .. } = analysis;

Expand Down
4 changes: 2 additions & 2 deletions src/test/run-make/execution-engine/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ fn compile_program(input: &str, sysroot: PathBuf)

abort_on_err(driver::phase_3_run_analysis_passes(
&sess, &cstore, ast_map, &arenas, &id,
MakeGlobMap::No, |tcx, mir_map, analysis| {
MakeGlobMap::No, |tcx, mir_map, analysis, _| {

let trans = driver::phase_4_translate_to_llvm(tcx, mir_map, analysis);
let trans = driver::phase_4_translate_to_llvm(tcx, mir_map.unwrap(), analysis);

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

Expand Down

0 comments on commit 185a0e5

Please sign in to comment.