Skip to content

Commit 3082273

Browse files
committed
rustc_driver: factor out computing the exit code
1 parent 51158cc commit 3082273

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/driver.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ pub fn main() {
296296
rustc_driver::init_rustc_env_logger();
297297
lazy_static::initialize(&ICE_HOOK);
298298
exit(
299-
rustc_driver::catch_fatal_errors(move || {
299+
rustc_driver::catch_with_exit_code(move || {
300300
let mut orig_args: Vec<String> = env::args().collect();
301301

302302
if orig_args.iter().any(|a| a == "--version" || a == "-V") {
@@ -411,7 +411,5 @@ pub fn main() {
411411
if clippy_enabled { &mut clippy } else { &mut default };
412412
rustc_driver::run_compiler(&args, callbacks, None, None)
413413
})
414-
.and_then(|result| result)
415-
.is_err() as i32,
416414
)
417415
}

0 commit comments

Comments
 (0)