diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-10 12:51:58 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-10 12:51:58 +0000 |
commit | aef93c918e2b6e0b8826e970b00c46f8a5c3aaa9 (patch) | |
tree | 0c264c806bb6fabbc31bb785f7ba2b8f16a3b7aa /crates/ra_hir/src | |
parent | 9225033cdf16fd9f3f38b3d3482efb0c36698085 (diff) | |
parent | 495a7ea9f78209435579453b83726e50f339e50e (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.rs | 4 |
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 @@ | |||
1 | use std::sync::Arc; | 1 | use std::{sync::Arc, panic}; |
2 | 2 | ||
3 | use parking_lot::Mutex; | 3 | use parking_lot::Mutex; |
4 | use salsa::{self, Database}; | 4 | use salsa::{self, Database}; |
@@ -18,6 +18,8 @@ pub(crate) struct MockDatabase { | |||
18 | file_counter: u32, | 18 | file_counter: u32, |
19 | } | 19 | } |
20 | 20 | ||
21 | impl panic::RefUnwindSafe for MockDatabase {} | ||
22 | |||
21 | impl MockDatabase { | 23 | impl 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); |