From 39d617bfa2d10ee031f0587c5f5a998d1877bd95 Mon Sep 17 00:00:00 2001 From: Igor Matuszewski Date: Sun, 15 Sep 2019 11:10:39 +0200 Subject: [PATCH] Fix nightly breakage Caused by https://github.com/rust-lang/rust/pull/60584 --- rls-rustc/src/lib.rs | 9 ++++----- rls/src/build/rustc.rs | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/rls-rustc/src/lib.rs b/rls-rustc/src/lib.rs index 3d497cd598c..42433470b79 100644 --- a/rls-rustc/src/lib.rs +++ b/rls-rustc/src/lib.rs @@ -72,11 +72,10 @@ pub fn run() -> Result<(), ()> { None => args, }; - rustc_driver::report_ices_to_stderr_if_any(|| { - run_compiler(&args, &mut shim_calls, file_loader, None) - }) - .map(|_| ()) - .map_err(|_| ()) + rustc_driver::install_ice_hook(); + rustc_driver::catch_fatal_errors(|| run_compiler(&args, &mut shim_calls, file_loader, None)) + .map(|_| ()) + .map_err(|_| ()) } #[derive(Default)] diff --git a/rls/src/build/rustc.rs b/rls/src/build/rustc.rs index 1c8e45c0637..5c46b054aa3 100644 --- a/rls/src/build/rustc.rs +++ b/rls/src/build/rustc.rs @@ -198,7 +198,7 @@ fn run_in_process( let result = std::panic::catch_unwind({ let stderr = Arc::clone(&stderr); || { - rustc_driver::report_ices_to_stderr_if_any(move || { + rustc_driver::catch_fatal_errors(move || { // Replace stderr so we catch most errors. run_compiler( &args,