Skip to content

Commit abdee77

Browse files
committed
Some cleanups around EarlyDiagCtxt
All callers of EarlyDiagCtxt::early_error now emit a fatal error.
1 parent 984cc68 commit abdee77

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/driver.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ pub fn main() {
197197
});
198198

199199
exit(rustc_driver::catch_with_exit_code(move || {
200-
let mut orig_args = rustc_driver::args::raw_args(&early_dcx)?;
200+
let mut orig_args = rustc_driver::args::raw_args(&early_dcx);
201201

202202
let has_sysroot_arg = |args: &mut [String]| -> bool {
203203
if has_arg(args, "--sysroot") {
@@ -239,7 +239,7 @@ pub fn main() {
239239
pass_sysroot_env_if_given(&mut args, sys_root_env);
240240

241241
rustc_driver::run_compiler(&args, &mut DefaultCallbacks);
242-
return Ok(());
242+
return;
243243
}
244244

245245
if orig_args.iter().any(|a| a == "--version" || a == "-V") {
@@ -301,7 +301,6 @@ pub fn main() {
301301
} else {
302302
rustc_driver::run_compiler(&args, &mut RustcCallbacks { clippy_args_var });
303303
}
304-
Ok(())
305304
}))
306305
}
307306

0 commit comments

Comments
 (0)