about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-10-11 01:26:06 +0000
committerbors <bors@rust-lang.org>2020-10-11 01:26:06 +0000
commit29cff6feffd9da569fe3aa171d10db2647bf86c9 (patch)
tree4de4e6c709a01a7a69caa18bd9bded8f2d711979
parentfbf2430f0279adb8132efe60b16f8dd7b6a2acb3 (diff)
parent1385eb9b5562ec78f772341e1ad5c3d2f5443141 (diff)
downloadrust-29cff6feffd9da569fe3aa171d10db2647bf86c9.tar.gz
rust-29cff6feffd9da569fe3aa171d10db2647bf86c9.zip
Auto merge of #77649 - dash2507:replace_run_compiler, r=matthewjasper
Replace run_compiler with RunCompiler builder pattern

Fixes #77286. Replaces rustc_driver:run_compiler with RunCompiler builder pattern.
-rw-r--r--src/driver.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/driver.rs b/src/driver.rs
index f4f2259cefd..377f6d22446 100644
--- a/src/driver.rs
+++ b/src/driver.rs
@@ -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") {
@@ -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()
     }))
 }