aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-11-27 13:32:36 +0000
committerAleksey Kladov <[email protected]>2018-11-27 15:25:35 +0000
commit68f66e0f446a2bd2385cfd236856f2a73bd58a3d (patch)
tree1a4e149e96d12207424ddcf6ae9a6b407cd250a5
parent5b0e347f89be317d21fd894c0ccf4abee5645429 (diff)
add db to resolve_path
-rw-r--r--crates/ra_analysis/src/completion/reference_completion.rs2
-rw-r--r--crates/ra_analysis/src/descriptors/module/mod.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/completion/reference_completion.rs b/crates/ra_analysis/src/completion/reference_completion.rs
index 41df881b3..924d2440f 100644
--- a/crates/ra_analysis/src/completion/reference_completion.rs
+++ b/crates/ra_analysis/src/completion/reference_completion.rs
@@ -157,7 +157,7 @@ fn complete_path(
157 return Ok(()); 157 return Ok(());
158 } 158 }
159 path.segments.pop(); 159 path.segments.pop();
160 let target_module = match module.resolve_path(path)? { 160 let target_module = match module.resolve_path(db, path)? {
161 None => return Ok(()), 161 None => return Ok(()),
162 Some(it) => it, 162 Some(it) => it,
163 }; 163 };
diff --git a/crates/ra_analysis/src/descriptors/module/mod.rs b/crates/ra_analysis/src/descriptors/module/mod.rs
index f5238e239..6890d8b09 100644
--- a/crates/ra_analysis/src/descriptors/module/mod.rs
+++ b/crates/ra_analysis/src/descriptors/module/mod.rs
@@ -133,7 +133,7 @@ impl ModuleDescriptor {
133 Ok(res) 133 Ok(res)
134 } 134 }
135 135
136 pub(crate) fn resolve_path(&self, path: Path) -> Cancelable<Option<ModuleDescriptor>> { 136 pub(crate) fn resolve_path(&self, db: &impl DescriptorDatabase, path: Path) -> Cancelable<Option<ModuleDescriptor>> {
137 let res = match self.do_resolve_path(path) { 137 let res = match self.do_resolve_path(path) {
138 None => return Ok(None), 138 None => return Ok(None),
139 Some(it) => it, 139 Some(it) => it,