diff --git a/rls-rustc/src/lib.rs b/rls-rustc/src/lib.rs index 3d497cd598c..f847513b59b 100644 --- a/rls-rustc/src/lib.rs +++ b/rls-rustc/src/lib.rs @@ -72,7 +72,8 @@ pub fn run() -> Result<(), ()> { None => args, }; - rustc_driver::report_ices_to_stderr_if_any(|| { + rustc_driver::install_ice_hook(); + rustc_driver::catch_fatal_errors(|| { run_compiler(&args, &mut shim_calls, file_loader, None) }) .map(|_| ()) 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,