From 64455ad701c8bce6e35793042f5e2ec177e12f7e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 10 Jan 2019 12:20:32 +0300 Subject: use unwinding for cancelation --- crates/ra_ide_api/src/db.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crates/ra_ide_api/src/db.rs') diff --git a/crates/ra_ide_api/src/db.rs b/crates/ra_ide_api/src/db.rs index 9d46609ec..a2e06f5db 100644 --- a/crates/ra_ide_api/src/db.rs +++ b/crates/ra_ide_api/src/db.rs @@ -1,7 +1,7 @@ use std::{fmt, sync::Arc}; use salsa::{self, Database}; -use ra_db::{LocationIntener, BaseDatabase, FileId}; +use ra_db::{LocationIntener, BaseDatabase, FileId, Canceled}; use crate::{symbol_index, LineIndex}; @@ -29,6 +29,9 @@ impl salsa::Database for RootDatabase { fn salsa_runtime(&self) -> &salsa::Runtime { &self.runtime } + fn on_propagated_panic(&self) -> ! { + Canceled::throw() + } } impl Default for RootDatabase { -- cgit v1.2.3