From 4496e2a06a91e5825f355ce730af802643e8018a Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Fri, 10 Jan 2020 18:40:45 +0100 Subject: Apply review suggestions --- crates/ra_hir/src/code_model.rs | 4 +++- crates/ra_hir/src/source_binder.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir') 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 { Module::new(self.krate(), module_id) } - pub fn find_path( + /// Finds a path that can be used to refer to the given item from within + /// this module, if possible. + pub fn find_use_path( self, db: &impl DefDatabase, 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 { } pub fn module(&self) -> Option { - Some(crate::code_model::Module { id: self.resolver.module_id()? }) + Some(crate::code_model::Module { id: self.resolver.module()? }) } fn expr_id(&self, expr: &ast::Expr) -> Option { -- cgit v1.2.3