diff options
author | Aleksey Kladov <[email protected]> | 2018-10-20 16:43:02 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-10-20 16:43:02 +0100 |
commit | 73dd870da2dcc991b0fdcdde8bee91f05cb9e182 (patch) | |
tree | 611f4bb8433c733a3e6c3c74779d79366a2ccc81 | |
parent | 2ded93a78a108c1f7e0dd0a9036c88c786f21dce (diff) |
update salsa
-rw-r--r-- | Cargo.lock | 6 | ||||
-rw-r--r-- | crates/ra_analysis/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_analysis/src/db.rs | 6 | ||||
-rw-r--r-- | crates/ra_analysis/src/module_map.rs | 6 | ||||
-rw-r--r-- | crates/ra_analysis/src/roots.rs | 8 |
5 files changed, 14 insertions, 14 deletions
diff --git a/Cargo.lock b/Cargo.lock index bb93b8b0e..bb0feec2e 100644 --- a/Cargo.lock +++ b/Cargo.lock | |||
@@ -620,7 +620,7 @@ dependencies = [ | |||
620 | "rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", | 620 | "rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", |
621 | "relative-path 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", | 621 | "relative-path 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", |
622 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", | 622 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", |
623 | "salsa 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", | 623 | "salsa 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", |
624 | "test_utils 0.1.0", | 624 | "test_utils 0.1.0", |
625 | ] | 625 | ] |
626 | 626 | ||
@@ -845,7 +845,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
845 | 845 | ||
846 | [[package]] | 846 | [[package]] |
847 | name = "salsa" | 847 | name = "salsa" |
848 | version = "0.5.0" | 848 | version = "0.6.0" |
849 | source = "registry+https://github.com/rust-lang/crates.io-index" | 849 | source = "registry+https://github.com/rust-lang/crates.io-index" |
850 | dependencies = [ | 850 | dependencies = [ |
851 | "derive-new 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", | 851 | "derive-new 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", |
@@ -1361,7 +1361,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1361 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" | 1361 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" |
1362 | "checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7" | 1362 | "checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7" |
1363 | "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" | 1363 | "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" |
1364 | "checksum salsa 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8301c563959d6d50fe0a34817f0d9ff08fe12eda7456e01e2bbde1588ea30602" | 1364 | "checksum salsa 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6c8f8b59428c040fbac0f6a2e698ae892e33d23d7519713ba8b243edb3082dad" |
1365 | "checksum same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f7794e2fda7f594866840e95f5c5962e886e228e68b6505885811a94dd728c" | 1365 | "checksum same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f7794e2fda7f594866840e95f5c5962e886e228e68b6505885811a94dd728c" |
1366 | "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" | 1366 | "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" |
1367 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" | 1367 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" |
diff --git a/crates/ra_analysis/Cargo.toml b/crates/ra_analysis/Cargo.toml index 17b04182f..dd4ec8375 100644 --- a/crates/ra_analysis/Cargo.toml +++ b/crates/ra_analysis/Cargo.toml | |||
@@ -15,7 +15,7 @@ fst = "0.3.1" | |||
15 | im = "12.0.0" | 15 | im = "12.0.0" |
16 | ra_syntax = { path = "../ra_syntax" } | 16 | ra_syntax = { path = "../ra_syntax" } |
17 | ra_editor = { path = "../ra_editor" } | 17 | ra_editor = { path = "../ra_editor" } |
18 | salsa = "0.5.0" | 18 | salsa = "0.6.0" |
19 | rustc-hash = "1.0" | 19 | rustc-hash = "1.0" |
20 | 20 | ||
21 | [dev-dependencies] | 21 | [dev-dependencies] |
diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index 042dde1ac..cce959669 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs | |||
@@ -16,7 +16,7 @@ use std::{ | |||
16 | 16 | ||
17 | #[derive(Default)] | 17 | #[derive(Default)] |
18 | pub(crate) struct RootDatabase { | 18 | pub(crate) struct RootDatabase { |
19 | runtime: salsa::runtime::Runtime<RootDatabase>, | 19 | runtime: salsa::Runtime<RootDatabase>, |
20 | } | 20 | } |
21 | 21 | ||
22 | impl fmt::Debug for RootDatabase { | 22 | impl fmt::Debug for RootDatabase { |
@@ -26,7 +26,7 @@ impl fmt::Debug for RootDatabase { | |||
26 | } | 26 | } |
27 | 27 | ||
28 | impl salsa::Database for RootDatabase { | 28 | impl salsa::Database for RootDatabase { |
29 | fn salsa_runtime(&self) -> &salsa::runtime::Runtime<RootDatabase> { | 29 | fn salsa_runtime(&self) -> &salsa::Runtime<RootDatabase> { |
30 | &self.runtime | 30 | &self.runtime |
31 | } | 31 | } |
32 | } | 32 | } |
@@ -69,7 +69,7 @@ salsa::query_group! { | |||
69 | type FileTextQuery; | 69 | type FileTextQuery; |
70 | storage input; | 70 | storage input; |
71 | } | 71 | } |
72 | fn file_set(key: ()) -> Arc<FileSet> { | 72 | fn file_set() -> Arc<FileSet> { |
73 | type FileSetQuery; | 73 | type FileSetQuery; |
74 | storage input; | 74 | storage input; |
75 | } | 75 | } |
diff --git a/crates/ra_analysis/src/module_map.rs b/crates/ra_analysis/src/module_map.rs index ff0ec3cc7..b15432498 100644 --- a/crates/ra_analysis/src/module_map.rs +++ b/crates/ra_analysis/src/module_map.rs | |||
@@ -8,7 +8,7 @@ use std::sync::Arc; | |||
8 | 8 | ||
9 | salsa::query_group! { | 9 | salsa::query_group! { |
10 | pub(crate) trait ModulesDatabase: SyntaxDatabase { | 10 | pub(crate) trait ModulesDatabase: SyntaxDatabase { |
11 | fn module_tree(key: ()) -> Arc<ModuleTreeDescriptor> { | 11 | fn module_tree() -> Arc<ModuleTreeDescriptor> { |
12 | type ModuleTreeQuery; | 12 | type ModuleTreeQuery; |
13 | } | 13 | } |
14 | fn module_descriptor(file_id: FileId) -> Arc<ModuleDescriptor> { | 14 | fn module_descriptor(file_id: FileId) -> Arc<ModuleDescriptor> { |
@@ -22,8 +22,8 @@ fn module_descriptor(db: &impl ModulesDatabase, file_id: FileId) -> Arc<ModuleDe | |||
22 | Arc::new(ModuleDescriptor::new(file.ast())) | 22 | Arc::new(ModuleDescriptor::new(file.ast())) |
23 | } | 23 | } |
24 | 24 | ||
25 | fn module_tree(db: &impl ModulesDatabase, (): ()) -> Arc<ModuleTreeDescriptor> { | 25 | fn module_tree(db: &impl ModulesDatabase) -> Arc<ModuleTreeDescriptor> { |
26 | let file_set = db.file_set(()); | 26 | let file_set = db.file_set(); |
27 | let mut files = Vec::new(); | 27 | let mut files = Vec::new(); |
28 | for &file_id in file_set.files.iter() { | 28 | for &file_id in file_set.files.iter() { |
29 | let module_descr = db.module_descriptor(file_id); | 29 | let module_descr = db.module_descriptor(file_id); |
diff --git a/crates/ra_analysis/src/roots.rs b/crates/ra_analysis/src/roots.rs index 1f2b21b27..19c84df65 100644 --- a/crates/ra_analysis/src/roots.rs +++ b/crates/ra_analysis/src/roots.rs | |||
@@ -50,7 +50,7 @@ impl WritableSourceRoot { | |||
50 | } | 50 | } |
51 | } | 51 | } |
52 | } | 52 | } |
53 | let file_set = self.db.file_set(()); | 53 | let file_set = self.db.file_set(); |
54 | let mut files: FxHashSet<FileId> = file_set.files.clone(); | 54 | let mut files: FxHashSet<FileId> = file_set.files.clone(); |
55 | for file_id in removed { | 55 | for file_id in removed { |
56 | files.remove(&file_id); | 56 | files.remove(&file_id); |
@@ -65,10 +65,10 @@ impl WritableSourceRoot { | |||
65 | 65 | ||
66 | impl SourceRoot for WritableSourceRoot { | 66 | impl SourceRoot for WritableSourceRoot { |
67 | fn module_tree(&self) -> Arc<ModuleTreeDescriptor> { | 67 | fn module_tree(&self) -> Arc<ModuleTreeDescriptor> { |
68 | self.db.module_tree(()) | 68 | self.db.module_tree() |
69 | } | 69 | } |
70 | fn contains(&self, file_id: FileId) -> bool { | 70 | fn contains(&self, file_id: FileId) -> bool { |
71 | self.db.file_set(()).files.contains(&file_id) | 71 | self.db.file_set().files.contains(&file_id) |
72 | } | 72 | } |
73 | fn lines(&self, file_id: FileId) -> Arc<LineIndex> { | 73 | fn lines(&self, file_id: FileId) -> Arc<LineIndex> { |
74 | self.db.file_lines(file_id) | 74 | self.db.file_lines(file_id) |
@@ -78,7 +78,7 @@ impl SourceRoot for WritableSourceRoot { | |||
78 | } | 78 | } |
79 | fn symbols<'a>(&'a self, acc: &mut Vec<Arc<SymbolIndex>>) { | 79 | fn symbols<'a>(&'a self, acc: &mut Vec<Arc<SymbolIndex>>) { |
80 | let db = &self.db; | 80 | let db = &self.db; |
81 | let symbols = db.file_set(()); | 81 | let symbols = db.file_set(); |
82 | let symbols = symbols | 82 | let symbols = symbols |
83 | .files | 83 | .files |
84 | .iter() | 84 | .iter() |