aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-10 12:51:58 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-10 12:51:58 +0000
commitaef93c918e2b6e0b8826e970b00c46f8a5c3aaa9 (patch)
tree0c264c806bb6fabbc31bb785f7ba2b8f16a3b7aa /crates/ra_hir/src
parent9225033cdf16fd9f3f38b3d3482efb0c36698085 (diff)
parent495a7ea9f78209435579453b83726e50f339e50e (diff)
Merge #478
478: WIP: implement cancelation via unwinding r=matklad a=matklad This uses https://github.com/salsa-rs/salsa/pull/107 to implement cancellation. Now we can get rid of `Cancelable` wrapper from everywhere except the top-level analyzer library. Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/mock.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_hir/src/mock.rs b/crates/ra_hir/src/mock.rs
index 0fae7de82..7a0301648 100644
--- a/crates/ra_hir/src/mock.rs
+++ b/crates/ra_hir/src/mock.rs
@@ -1,4 +1,4 @@
1use std::sync::Arc; 1use std::{sync::Arc, panic};
2 2
3use parking_lot::Mutex; 3use parking_lot::Mutex;
4use salsa::{self, Database}; 4use salsa::{self, Database};
@@ -18,6 +18,8 @@ pub(crate) struct MockDatabase {
18 file_counter: u32, 18 file_counter: u32,
19} 19}
20 20
21impl panic::RefUnwindSafe for MockDatabase {}
22
21impl MockDatabase { 23impl MockDatabase {
22 pub(crate) fn with_files(fixture: &str) -> (MockDatabase, SourceRoot) { 24 pub(crate) fn with_files(fixture: &str) -> (MockDatabase, SourceRoot) {
23 let (db, source_root, position) = MockDatabase::from_fixture(fixture); 25 let (db, source_root, position) = MockDatabase::from_fixture(fixture);