]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #1413 - RalfJung:catch_with_exit_code, r=RalfJung
authorbors <bors@rust-lang.org>
Sat, 16 May 2020 09:30:49 +0000 (09:30 +0000)
committerbors <bors@rust-lang.org>
Sat, 16 May 2020 09:30:49 +0000 (09:30 +0000)
use new rustc_driver::catch_with_exit_code

rust-version
src/bin/miri.rs

index aafee80cbe02d5b72d524a9c6c6d2b825736f848..b1b25c4bcab6830eca91674a941724c34cb18d60 100644 (file)
@@ -1 +1 @@
-6f5c7827b71d1e1e4831fa7522e49acaf2a9e44e
+84539360498cab3c70a7c9114c0b8106c8e1b06b
index 96de81b62430748193c05d0e8fa772b68a39bfbb..48e4a60c71f94efe2208070fb37f7154b5bfbe64 100644 (file)
@@ -144,14 +144,9 @@ fn run_compiler(mut args: Vec<String>, 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)
 }