diff options
| author | Darshan Kathiriya <darshankathiriya121@gmail.com> | 2020-10-07 09:09:59 -0300 |
|---|---|---|
| committer | Darshan Kathiriya <darshankathiriya121@gmail.com> | 2020-10-08 16:11:45 -0300 |
| commit | 1385eb9b5562ec78f772341e1ad5c3d2f5443141 (patch) | |
| tree | 59f50a15db708a37ef98b1d2debacfe4bdb1c153 /src | |
| parent | adb7fc6283711c881186ca85bb9ac3bb8add099b (diff) | |
| download | rust-1385eb9b5562ec78f772341e1ad5c3d2f5443141.tar.gz rust-1385eb9b5562ec78f772341e1ad5c3d2f5443141.zip | |
Replace run_compiler with RunCompiler builder pattern.
RunCompiler::new takes non-optional params, and optional params can be set using set_*field_name* method. finally `run` will forward all fields to `run_compiler`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/driver.rs | 4 |
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() })) } |
