Skip to content

Commit

Permalink
Auto merge of rust-lang#77649 - dash2507:replace_run_compiler, r=matt…
Browse files Browse the repository at this point in the history
…hewjasper

Replace run_compiler with RunCompiler builder pattern

Fixes rust-lang#77286. Replaces rustc_driver:run_compiler with RunCompiler builder pattern.
  • Loading branch information
bors committed Oct 11, 2020
2 parents fbf2430 + 1385eb9 commit 29cff6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ pub fn main() {
args.extend(vec!["--sysroot".into(), sys_root]);
};

return rustc_driver::run_compiler(&args, &mut DefaultCallbacks, None, None, None);
return rustc_driver::RunCompiler::new(&args, &mut DefaultCallbacks).run();
}

if orig_args.iter().any(|a| a == "--version" || a == "-V") {
Expand Down Expand Up @@ -420,6 +420,6 @@ pub fn main() {
let mut default = DefaultCallbacks;
let callbacks: &mut (dyn rustc_driver::Callbacks + Send) =
if clippy_enabled { &mut clippy } else { &mut default };
rustc_driver::run_compiler(&args, callbacks, None, None, None)
rustc_driver::RunCompiler::new(&args, callbacks).run()
}))
}

0 comments on commit 29cff6f

Please sign in to comment.