diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2025-02-03 05:02:55 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2025-02-03 05:02:55 +0000 |
| commit | 45c3b3d4803631ac4c0061edfbc3213eaaa86fda (patch) | |
| tree | abff4fa9ad66a86a870d05cc7938d5a698a19369 /src/tools/miri | |
| parent | 3f57fc170aab2da57ff0c695051bfd26571b9391 (diff) | |
| parent | d6ca7ad0d7a7e8acd14f6da3bad4e7b5a25c3d17 (diff) | |
| download | rust-45c3b3d4803631ac4c0061edfbc3213eaaa86fda.tar.gz rust-45c3b3d4803631ac4c0061edfbc3213eaaa86fda.zip | |
Merge from rustc
Diffstat (limited to 'src/tools/miri')
| -rw-r--r-- | src/tools/miri/src/bin/miri.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tools/miri/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs index 77692ed8655..685f5670ab4 100644 --- a/src/tools/miri/src/bin/miri.rs +++ b/src/tools/miri/src/bin/miri.rs @@ -379,10 +379,8 @@ fn run_compiler_and_exit( callbacks: &mut (dyn rustc_driver::Callbacks + Send), ) -> ! { // Invoke compiler, and handle return code. - let exit_code = rustc_driver::catch_with_exit_code(move || { - rustc_driver::run_compiler(args, callbacks); - Ok(()) - }); + let exit_code = + rustc_driver::catch_with_exit_code(move || rustc_driver::run_compiler(args, callbacks)); std::process::exit(exit_code) } @@ -461,7 +459,7 @@ fn main() { // (`install_ice_hook` might change `RUST_BACKTRACE`.) let env_snapshot = env::vars_os().collect::<Vec<_>>(); - let args = rustc_driver::args::raw_args(&early_dcx) + let args = rustc_driver::catch_fatal_errors(|| rustc_driver::args::raw_args(&early_dcx)) .unwrap_or_else(|_| std::process::exit(rustc_driver::EXIT_FAILURE)); // Install the ctrlc handler that sets `rustc_const_eval::CTRL_C_RECEIVED`, even if |
