about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-02-02 15:17:29 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-02-02 16:06:43 +0000
commitabdee777c24c9ad398044b819a93f7a8903acbd3 (patch)
treed3d470b9655fdc8bb60f6a692749d70c19e47a02
parent984cc68c1c120811b8bc50e7b3c81d49f9e6ade8 (diff)
downloadrust-abdee777c24c9ad398044b819a93f7a8903acbd3.tar.gz
rust-abdee777c24c9ad398044b819a93f7a8903acbd3.zip
Some cleanups around EarlyDiagCtxt
All callers of EarlyDiagCtxt::early_error now emit a fatal error.
-rw-r--r--src/driver.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/driver.rs b/src/driver.rs
index c548f262a92..e4092bcd105 100644
--- a/src/driver.rs
+++ b/src/driver.rs
@@ -197,7 +197,7 @@ pub fn main() {
     });
 
     exit(rustc_driver::catch_with_exit_code(move || {
-        let mut orig_args = rustc_driver::args::raw_args(&early_dcx)?;
+        let mut orig_args = rustc_driver::args::raw_args(&early_dcx);
 
         let has_sysroot_arg = |args: &mut [String]| -> bool {
             if has_arg(args, "--sysroot") {
@@ -239,7 +239,7 @@ pub fn main() {
             pass_sysroot_env_if_given(&mut args, sys_root_env);
 
             rustc_driver::run_compiler(&args, &mut DefaultCallbacks);
-            return Ok(());
+            return;
         }
 
         if orig_args.iter().any(|a| a == "--version" || a == "-V") {
@@ -301,7 +301,6 @@ pub fn main() {
         } else {
             rustc_driver::run_compiler(&args, &mut RustcCallbacks { clippy_args_var });
         }
-        Ok(())
     }))
 }