From e0f9081c5cdcf21d3e02c1e31bac5a5d95a4c581 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 16 May 2020 11:30:11 +0200 Subject: [PATCH] use new rustc_driver::catch_with_exit_code --- rust-version | 2 +- src/bin/miri.rs | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/rust-version b/rust-version index aafee80cbe0..b1b25c4bcab 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -6f5c7827b71d1e1e4831fa7522e49acaf2a9e44e +84539360498cab3c70a7c9114c0b8106c8e1b06b diff --git a/src/bin/miri.rs b/src/bin/miri.rs index 96de81b6243..48e4a60c71f 100644 --- a/src/bin/miri.rs +++ b/src/bin/miri.rs @@ -144,14 +144,9 @@ fn run_compiler(mut args: Vec, callbacks: &mut (dyn rustc_driver::Callba args.splice(1..1, miri::miri_default_args().iter().map(ToString::to_string)); // Invoke compiler, and handle return code. - let result = rustc_driver::catch_fatal_errors(move || { + let exit_code = rustc_driver::catch_with_exit_code(move || { rustc_driver::run_compiler(&args, callbacks, None, None) - }) - .and_then(|result| result); - let exit_code = match result { - Ok(()) => rustc_driver::EXIT_SUCCESS, - Err(_) => rustc_driver::EXIT_FAILURE, - }; + }); std::process::exit(exit_code) }