Skip to content

Commit e0f9081

Browse files
committed
use new rustc_driver::catch_with_exit_code
1 parent c54eab4 commit e0f9081

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6f5c7827b71d1e1e4831fa7522e49acaf2a9e44e
1+
84539360498cab3c70a7c9114c0b8106c8e1b06b

src/bin/miri.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,9 @@ fn run_compiler(mut args: Vec<String>, callbacks: &mut (dyn rustc_driver::Callba
144144
args.splice(1..1, miri::miri_default_args().iter().map(ToString::to_string));
145145

146146
// Invoke compiler, and handle return code.
147-
let result = rustc_driver::catch_fatal_errors(move || {
147+
let exit_code = rustc_driver::catch_with_exit_code(move || {
148148
rustc_driver::run_compiler(&args, callbacks, None, None)
149-
})
150-
.and_then(|result| result);
151-
let exit_code = match result {
152-
Ok(()) => rustc_driver::EXIT_SUCCESS,
153-
Err(_) => rustc_driver::EXIT_FAILURE,
154-
};
149+
});
155150
std::process::exit(exit_code)
156151
}
157152

0 commit comments

Comments
 (0)