mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
use unwinding for cancelation
This commit is contained in:
parent
cf20ecae9f
commit
64455ad701
6 changed files with 61 additions and 43 deletions
|
@ -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<RootDatabase> {
|
||||
&self.runtime
|
||||
}
|
||||
fn on_propagated_panic(&self) -> ! {
|
||||
Canceled::throw()
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for RootDatabase {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue