diff options
-rw-r--r-- | Cargo.lock | 52 | ||||
-rw-r--r-- | crates/ra_assists/src/test_db.rs | 3 | ||||
-rw-r--r-- | crates/ra_cli/src/analysis_bench.rs | 4 | ||||
-rw-r--r-- | crates/ra_db/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/test_db.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir_def/src/test_db.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/test_db.rs | 4 | ||||
-rw-r--r-- | crates/ra_ide_api/src/change.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/db.rs | 3 |
9 files changed, 53 insertions, 25 deletions
diff --git a/Cargo.lock b/Cargo.lock index 8c8111286..12d8af7e2 100644 --- a/Cargo.lock +++ b/Cargo.lock | |||
@@ -292,16 +292,6 @@ dependencies = [ | |||
292 | ] | 292 | ] |
293 | 293 | ||
294 | [[package]] | 294 | [[package]] |
295 | name = "derive-new" | ||
296 | version = "0.5.8" | ||
297 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
298 | dependencies = [ | ||
299 | "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", | ||
300 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", | ||
301 | "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", | ||
302 | ] | ||
303 | |||
304 | [[package]] | ||
305 | name = "difference" | 295 | name = "difference" |
306 | version = "2.0.0" | 296 | version = "2.0.0" |
307 | source = "registry+https://github.com/rust-lang/crates.io-index" | 297 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -800,6 +790,15 @@ dependencies = [ | |||
800 | ] | 790 | ] |
801 | 791 | ||
802 | [[package]] | 792 | [[package]] |
793 | name = "parking_lot" | ||
794 | version = "0.10.0" | ||
795 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
796 | dependencies = [ | ||
797 | "lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", | ||
798 | "parking_lot_core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
799 | ] | ||
800 | |||
801 | [[package]] | ||
803 | name = "parking_lot_core" | 802 | name = "parking_lot_core" |
804 | version = "0.6.2" | 803 | version = "0.6.2" |
805 | source = "registry+https://github.com/rust-lang/crates.io-index" | 804 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -814,6 +813,19 @@ dependencies = [ | |||
814 | ] | 813 | ] |
815 | 814 | ||
816 | [[package]] | 815 | [[package]] |
816 | name = "parking_lot_core" | ||
817 | version = "0.7.0" | ||
818 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
819 | dependencies = [ | ||
820 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", | ||
821 | "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", | ||
822 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", | ||
823 | "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", | ||
824 | "smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
825 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", | ||
826 | ] | ||
827 | |||
828 | [[package]] | ||
817 | name = "paste" | 829 | name = "paste" |
818 | version = "0.1.6" | 830 | version = "0.1.6" |
819 | source = "registry+https://github.com/rust-lang/crates.io-index" | 831 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -981,7 +993,7 @@ dependencies = [ | |||
981 | "ra_syntax 0.1.0", | 993 | "ra_syntax 0.1.0", |
982 | "relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", | 994 | "relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", |
983 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", | 995 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", |
984 | "salsa 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", | 996 | "salsa 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", |
985 | "test_utils 0.1.0", | 997 | "test_utils 0.1.0", |
986 | ] | 998 | ] |
987 | 999 | ||
@@ -1472,23 +1484,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1472 | 1484 | ||
1473 | [[package]] | 1485 | [[package]] |
1474 | name = "salsa" | 1486 | name = "salsa" |
1475 | version = "0.13.2" | 1487 | version = "0.14.1" |
1476 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1488 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1477 | dependencies = [ | 1489 | dependencies = [ |
1478 | "crossbeam 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", | 1490 | "crossbeam 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", |
1479 | "derive-new 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1480 | "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1491 | "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1481 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | 1492 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", |
1482 | "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1493 | "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1483 | "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", | 1494 | "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", |
1484 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", | 1495 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", |
1485 | "salsa-macros 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", | 1496 | "salsa-macros 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", |
1486 | "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", | 1497 | "smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1487 | ] | 1498 | ] |
1488 | 1499 | ||
1489 | [[package]] | 1500 | [[package]] |
1490 | name = "salsa-macros" | 1501 | name = "salsa-macros" |
1491 | version = "0.13.2" | 1502 | version = "0.14.1" |
1492 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1503 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1493 | dependencies = [ | 1504 | dependencies = [ |
1494 | "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", | 1505 | "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", |
@@ -1877,7 +1888,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1877 | "checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" | 1888 | "checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" |
1878 | "checksum crossbeam-queue 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfd6515864a82d2f877b42813d4553292c6659498c9a2aa31bab5a15243c2700" | 1889 | "checksum crossbeam-queue 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfd6515864a82d2f877b42813d4553292c6659498c9a2aa31bab5a15243c2700" |
1879 | "checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" | 1890 | "checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" |
1880 | "checksum derive-new 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)" = "71f31892cd5c62e414316f2963c5689242c43d8e7bbcaaeca97e5e28c95d91d9" | ||
1881 | "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" | 1891 | "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" |
1882 | "checksum drop_bomb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "69b26e475fd29098530e709294e94e661974c851aed42512793f120fed4e199f" | 1892 | "checksum drop_bomb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "69b26e475fd29098530e709294e94e661974c851aed42512793f120fed4e199f" |
1883 | "checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" | 1893 | "checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" |
@@ -1940,8 +1950,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1940 | "checksum number_prefix 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" | 1950 | "checksum number_prefix 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" |
1941 | "checksum once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "891f486f630e5c5a4916c7e16c4b24a53e78c860b646e9f8e005e4f16847bfed" | 1951 | "checksum once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "891f486f630e5c5a4916c7e16c4b24a53e78c860b646e9f8e005e4f16847bfed" |
1942 | "checksum ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a86ed3f5f244b372d6b1a00b72ef7f8876d0bc6a78a4c9985c53614041512063" | 1952 | "checksum ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a86ed3f5f244b372d6b1a00b72ef7f8876d0bc6a78a4c9985c53614041512063" |
1953 | "checksum parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92e98c49ab0b7ce5b222f2cc9193fc4efe11c6d0bd4f648e374684a6857b1cfc" | ||
1943 | "checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" | 1954 | "checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" |
1944 | "checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" | 1955 | "checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" |
1956 | "checksum parking_lot_core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7582838484df45743c8434fbff785e8edf260c28748353d44bc0da32e0ceabf1" | ||
1945 | "checksum paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "423a519e1c6e828f1e73b720f9d9ed2fa643dce8a7737fb43235ce0b41eeaa49" | 1957 | "checksum paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "423a519e1c6e828f1e73b720f9d9ed2fa643dce8a7737fb43235ce0b41eeaa49" |
1946 | "checksum paste-impl 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5" | 1958 | "checksum paste-impl 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5" |
1947 | "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" | 1959 | "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" |
@@ -1985,8 +1997,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1985 | "checksum rustc_lexer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c86aae0c77166108c01305ee1a36a1e77289d7dc6ca0a3cd91ff4992de2d16a5" | 1997 | "checksum rustc_lexer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c86aae0c77166108c01305ee1a36a1e77289d7dc6ca0a3cd91ff4992de2d16a5" |
1986 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" | 1998 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" |
1987 | "checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" | 1999 | "checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" |
1988 | "checksum salsa 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ec0865bdd9d8e614686a0cbb76979c735810131d287eb1683e91e4e64a58c387" | 2000 | "checksum salsa 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4a006c56096acaaa5e82e5974c28d05ff1e84aa70615f19c53fecf8a1afb2fd2" |
1989 | "checksum salsa-macros 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cac182212d3a1db75ddc42399ff1461b258a694b8318ee7e0baf6c976e39efee" | 2001 | "checksum salsa-macros 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "038a09b6271446f1123f142fe7e5bef6d4687c4cf82e6986be574c2af3745530" |
1990 | "checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" | 2002 | "checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" |
1991 | "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" | 2003 | "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" |
1992 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" | 2004 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" |
diff --git a/crates/ra_assists/src/test_db.rs b/crates/ra_assists/src/test_db.rs index 5f96c974b..523259fd4 100644 --- a/crates/ra_assists/src/test_db.rs +++ b/crates/ra_assists/src/test_db.rs | |||
@@ -21,6 +21,9 @@ impl salsa::Database for TestDB { | |||
21 | fn salsa_runtime(&self) -> &salsa::Runtime<Self> { | 21 | fn salsa_runtime(&self) -> &salsa::Runtime<Self> { |
22 | &self.runtime | 22 | &self.runtime |
23 | } | 23 | } |
24 | fn salsa_runtime_mut(&mut self) -> &mut salsa::Runtime<Self> { | ||
25 | &mut self.runtime | ||
26 | } | ||
24 | } | 27 | } |
25 | 28 | ||
26 | impl std::panic::RefUnwindSafe for TestDB {} | 29 | impl std::panic::RefUnwindSafe for TestDB {} |
diff --git a/crates/ra_cli/src/analysis_bench.rs b/crates/ra_cli/src/analysis_bench.rs index 8bbe5d9e8..34105af57 100644 --- a/crates/ra_cli/src/analysis_bench.rs +++ b/crates/ra_cli/src/analysis_bench.rs | |||
@@ -91,7 +91,7 @@ fn do_work<F: Fn(&Analysis) -> T, T>(host: &mut AnalysisHost, file_id: FileId, w | |||
91 | { | 91 | { |
92 | let start = Instant::now(); | 92 | let start = Instant::now(); |
93 | eprint!("trivial change: "); | 93 | eprint!("trivial change: "); |
94 | host.raw_database().salsa_runtime().synthetic_write(Durability::LOW); | 94 | host.raw_database_mut().salsa_runtime_mut().synthetic_write(Durability::LOW); |
95 | work(&host.analysis()); | 95 | work(&host.analysis()); |
96 | eprintln!("{:?}", start.elapsed()); | 96 | eprintln!("{:?}", start.elapsed()); |
97 | } | 97 | } |
@@ -111,7 +111,7 @@ fn do_work<F: Fn(&Analysis) -> T, T>(host: &mut AnalysisHost, file_id: FileId, w | |||
111 | { | 111 | { |
112 | let start = Instant::now(); | 112 | let start = Instant::now(); |
113 | eprint!("const change: "); | 113 | eprint!("const change: "); |
114 | host.raw_database().salsa_runtime().synthetic_write(Durability::HIGH); | 114 | host.raw_database_mut().salsa_runtime_mut().synthetic_write(Durability::HIGH); |
115 | let res = work(&host.analysis()); | 115 | let res = work(&host.analysis()); |
116 | eprintln!("{:?}", start.elapsed()); | 116 | eprintln!("{:?}", start.elapsed()); |
117 | res | 117 | res |
diff --git a/crates/ra_db/Cargo.toml b/crates/ra_db/Cargo.toml index 4ec09b6d9..7afa5d8fc 100644 --- a/crates/ra_db/Cargo.toml +++ b/crates/ra_db/Cargo.toml | |||
@@ -8,7 +8,7 @@ authors = ["rust-analyzer developers"] | |||
8 | doctest = false | 8 | doctest = false |
9 | 9 | ||
10 | [dependencies] | 10 | [dependencies] |
11 | salsa = "0.13.0" | 11 | salsa = "0.14.1" |
12 | relative-path = "1.0.0" | 12 | relative-path = "1.0.0" |
13 | rustc-hash = "1.0" | 13 | rustc-hash = "1.0" |
14 | 14 | ||
diff --git a/crates/ra_hir/src/test_db.rs b/crates/ra_hir/src/test_db.rs index efee2f658..a2071f71c 100644 --- a/crates/ra_hir/src/test_db.rs +++ b/crates/ra_hir/src/test_db.rs | |||
@@ -28,6 +28,10 @@ impl salsa::Database for TestDB { | |||
28 | &self.runtime | 28 | &self.runtime |
29 | } | 29 | } |
30 | 30 | ||
31 | fn salsa_runtime_mut(&mut self) -> &mut salsa::Runtime<Self> { | ||
32 | &mut self.runtime | ||
33 | } | ||
34 | |||
31 | fn salsa_event(&self, event: impl Fn() -> salsa::Event<TestDB>) { | 35 | fn salsa_event(&self, event: impl Fn() -> salsa::Event<TestDB>) { |
32 | let mut events = self.events.lock(); | 36 | let mut events = self.events.lock(); |
33 | if let Some(events) = &mut *events { | 37 | if let Some(events) = &mut *events { |
diff --git a/crates/ra_hir_def/src/test_db.rs b/crates/ra_hir_def/src/test_db.rs index 439e8a412..54e3a84bd 100644 --- a/crates/ra_hir_def/src/test_db.rs +++ b/crates/ra_hir_def/src/test_db.rs | |||
@@ -24,7 +24,9 @@ impl salsa::Database for TestDB { | |||
24 | fn salsa_runtime(&self) -> &salsa::Runtime<Self> { | 24 | fn salsa_runtime(&self) -> &salsa::Runtime<Self> { |
25 | &self.runtime | 25 | &self.runtime |
26 | } | 26 | } |
27 | 27 | fn salsa_runtime_mut(&mut self) -> &mut salsa::Runtime<Self> { | |
28 | &mut self.runtime | ||
29 | } | ||
28 | fn salsa_event(&self, event: impl Fn() -> salsa::Event<TestDB>) { | 30 | fn salsa_event(&self, event: impl Fn() -> salsa::Event<TestDB>) { |
29 | let mut events = self.events.lock().unwrap(); | 31 | let mut events = self.events.lock().unwrap(); |
30 | if let Some(events) = &mut *events { | 32 | if let Some(events) = &mut *events { |
diff --git a/crates/ra_hir_expand/src/test_db.rs b/crates/ra_hir_expand/src/test_db.rs index d23e75d9e..918736e2a 100644 --- a/crates/ra_hir_expand/src/test_db.rs +++ b/crates/ra_hir_expand/src/test_db.rs | |||
@@ -23,6 +23,10 @@ impl salsa::Database for TestDB { | |||
23 | &self.runtime | 23 | &self.runtime |
24 | } | 24 | } |
25 | 25 | ||
26 | fn salsa_runtime_mut(&mut self) -> &mut salsa::Runtime<Self> { | ||
27 | &mut self.runtime | ||
28 | } | ||
29 | |||
26 | fn salsa_event(&self, event: impl Fn() -> salsa::Event<TestDB>) { | 30 | fn salsa_event(&self, event: impl Fn() -> salsa::Event<TestDB>) { |
27 | let mut events = self.events.lock().unwrap(); | 31 | let mut events = self.events.lock().unwrap(); |
28 | if let Some(events) = &mut *events { | 32 | if let Some(events) = &mut *events { |
diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs index 0f692460d..84340aff8 100644 --- a/crates/ra_ide_api/src/change.rs +++ b/crates/ra_ide_api/src/change.rs | |||
@@ -171,7 +171,7 @@ impl RootDatabase { | |||
171 | log::info!("apply_change {:?}", change); | 171 | log::info!("apply_change {:?}", change); |
172 | { | 172 | { |
173 | let _p = profile("RootDatabase::apply_change/cancellation"); | 173 | let _p = profile("RootDatabase::apply_change/cancellation"); |
174 | self.salsa_runtime().synthetic_write(Durability::LOW); | 174 | self.salsa_runtime_mut().synthetic_write(Durability::LOW); |
175 | } | 175 | } |
176 | if !change.new_roots.is_empty() { | 176 | if !change.new_roots.is_empty() { |
177 | let mut local_roots = Vec::clone(&self.local_roots()); | 177 | let mut local_roots = Vec::clone(&self.local_roots()); |
diff --git a/crates/ra_ide_api/src/db.rs b/crates/ra_ide_api/src/db.rs index c2a9dcdd1..f739ebecd 100644 --- a/crates/ra_ide_api/src/db.rs +++ b/crates/ra_ide_api/src/db.rs | |||
@@ -65,6 +65,9 @@ impl salsa::Database for RootDatabase { | |||
65 | fn salsa_runtime(&self) -> &salsa::Runtime<RootDatabase> { | 65 | fn salsa_runtime(&self) -> &salsa::Runtime<RootDatabase> { |
66 | &self.runtime | 66 | &self.runtime |
67 | } | 67 | } |
68 | fn salsa_runtime_mut(&mut self) -> &mut salsa::Runtime<Self> { | ||
69 | &mut self.runtime | ||
70 | } | ||
68 | fn on_propagated_panic(&self) -> ! { | 71 | fn on_propagated_panic(&self) -> ! { |
69 | Canceled::throw() | 72 | Canceled::throw() |
70 | } | 73 | } |