Remove RunCompiler

It has become nothing other than a wrapper around run_compiler.
This commit is contained in:
bjorn3 2025-01-22 14:13:14 +00:00
parent 974db1a6e4
commit a77776cc1d
9 changed files with 16 additions and 32 deletions

View file

@ -236,7 +236,7 @@ pub fn main() {
let mut args: Vec<String> = orig_args.clone();
pass_sysroot_env_if_given(&mut args, sys_root_env);
rustc_driver::RunCompiler::new(&args, &mut DefaultCallbacks).run();
rustc_driver::run_compiler(&args, &mut DefaultCallbacks);
return Ok(());
}
@ -295,9 +295,9 @@ pub fn main() {
let clippy_enabled = !cap_lints_allow && relevant_package && !info_query;
if clippy_enabled {
args.extend(clippy_args);
rustc_driver::RunCompiler::new(&args, &mut ClippyCallbacks { clippy_args_var }).run();
rustc_driver::run_compiler(&args, &mut ClippyCallbacks { clippy_args_var });
} else {
rustc_driver::RunCompiler::new(&args, &mut RustcCallbacks { clippy_args_var }).run();
rustc_driver::run_compiler(&args, &mut RustcCallbacks { clippy_args_var });
}
Ok(())
}))

View file

@ -373,7 +373,7 @@ fn run_compiler_and_exit(
) -> ! {
// Invoke compiler, and handle return code.
let exit_code = rustc_driver::catch_with_exit_code(move || {
rustc_driver::RunCompiler::new(args, callbacks).run();
rustc_driver::run_compiler(args, callbacks);
Ok(())
});
std::process::exit(exit_code)