aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/code_model.rs4
-rw-r--r--crates/ra_hir/src/source_binder.rs2
2 files changed, 4 insertions, 2 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 4da3db0d6..df9c151e5 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -228,7 +228,9 @@ impl Module {
228 Module::new(self.krate(), module_id) 228 Module::new(self.krate(), module_id)
229 } 229 }
230 230
231 pub fn find_path( 231 /// Finds a path that can be used to refer to the given item from within
232 /// this module, if possible.
233 pub fn find_use_path(
232 self, 234 self,
233 db: &impl DefDatabase, 235 db: &impl DefDatabase,
234 item: ModuleDef, 236 item: ModuleDef,
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 71339565f..a2a9d968c 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -206,7 +206,7 @@ impl SourceAnalyzer {
206 } 206 }
207 207
208 pub fn module(&self) -> Option<crate::code_model::Module> { 208 pub fn module(&self) -> Option<crate::code_model::Module> {
209 Some(crate::code_model::Module { id: self.resolver.module_id()? }) 209 Some(crate::code_model::Module { id: self.resolver.module()? })
210 } 210 }
211 211
212 fn expr_id(&self, expr: &ast::Expr) -> Option<ExprId> { 212 fn expr_id(&self, expr: &ast::Expr) -> Option<ExprId> {