Skip to content

Commit 29cff6f

Browse files
committed
Auto merge of rust-lang#77649 - dash2507:replace_run_compiler, r=matthewjasper
Replace run_compiler with RunCompiler builder pattern Fixes rust-lang#77286. Replaces rustc_driver:run_compiler with RunCompiler builder pattern.
2 parents fbf2430 + 1385eb9 commit 29cff6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/driver.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ pub fn main() {
357357
args.extend(vec!["--sysroot".into(), sys_root]);
358358
};
359359

360-
return rustc_driver::run_compiler(&args, &mut DefaultCallbacks, None, None, None);
360+
return rustc_driver::RunCompiler::new(&args, &mut DefaultCallbacks).run();
361361
}
362362

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

0 commit comments

Comments
 (0)