diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-15 12:17:13 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-15 12:17:13 +0000 |
commit | c7f072372edc7a94544c993d03928aab2ac92dab (patch) | |
tree | 13dc4378b272541f340c08d5be91146857059aaf /crates/ra_db | |
parent | 2184f7f14250c888e37cc27475c085515ea63aa4 (diff) | |
parent | dd45697e5396d4a6ac8e838e1f4f510c960b9c43 (diff) |
Merge #547
547: update salsa r=matklad a=matklad
Notably, this includes unwinding-based cancelation.
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_db')
-rw-r--r-- | crates/ra_db/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_db/src/lib.rs | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_db/Cargo.toml b/crates/ra_db/Cargo.toml index 2c1f94ad0..21d987688 100644 --- a/crates/ra_db/Cargo.toml +++ b/crates/ra_db/Cargo.toml | |||
@@ -6,7 +6,7 @@ authors = ["Aleksey Kladov <[email protected]>"] | |||
6 | 6 | ||
7 | [dependencies] | 7 | [dependencies] |
8 | relative-path = "0.4.0" | 8 | relative-path = "0.4.0" |
9 | salsa = "0.9.1" | 9 | salsa = "0.9.2" |
10 | rustc-hash = "1.0" | 10 | rustc-hash = "1.0" |
11 | parking_lot = "0.7.0" | 11 | parking_lot = "0.7.0" |
12 | ra_arena = { path = "../ra_arena" } | 12 | ra_arena = { path = "../ra_arena" } |
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs index 0c4dfc8c6..0e7f32e66 100644 --- a/crates/ra_db/src/lib.rs +++ b/crates/ra_db/src/lib.rs | |||
@@ -22,8 +22,9 @@ pub use crate::{ | |||
22 | 22 | ||
23 | pub trait BaseDatabase: salsa::Database + panic::RefUnwindSafe { | 23 | pub trait BaseDatabase: salsa::Database + panic::RefUnwindSafe { |
24 | fn check_canceled(&self) -> Cancelable<()> { | 24 | fn check_canceled(&self) -> Cancelable<()> { |
25 | self.salsa_runtime() | 25 | if self.salsa_runtime().is_current_revision_canceled() { |
26 | .if_current_revision_is_canceled(Canceled::throw); | 26 | Canceled::throw() |
27 | } | ||
27 | Ok(()) | 28 | Ok(()) |
28 | } | 29 | } |
29 | 30 | ||