From 36b1d20c1661877c0c5a55ccd07522bc97bfc254 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 28 Nov 2018 01:19:55 +0300 Subject: rename ModuleDescriptor -> Module --- crates/ra_analysis/src/completion/mod.rs | 6 ++---- crates/ra_analysis/src/completion/reference_completion.rs | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'crates/ra_analysis/src/completion') diff --git a/crates/ra_analysis/src/completion/mod.rs b/crates/ra_analysis/src/completion/mod.rs index 08fb149af..67ec9a735 100644 --- a/crates/ra_analysis/src/completion/mod.rs +++ b/crates/ra_analysis/src/completion/mod.rs @@ -11,9 +11,7 @@ use rustc_hash::{FxHashMap}; use crate::{ db::{self, SyntaxDatabase}, - hir:: - ModuleDescriptor - , + hir, Cancelable, FilePosition }; @@ -38,7 +36,7 @@ pub(crate) fn completions( original_file.reparse(&edit) }; - let module = ctry!(ModuleDescriptor::guess_from_position(db, position)?); + let module = ctry!(hir::Module::guess_from_position(db, position)?); let mut res = Vec::new(); let mut has_completions = false; diff --git a/crates/ra_analysis/src/completion/reference_completion.rs b/crates/ra_analysis/src/completion/reference_completion.rs index 5bf8c3725..881d29916 100644 --- a/crates/ra_analysis/src/completion/reference_completion.rs +++ b/crates/ra_analysis/src/completion/reference_completion.rs @@ -11,7 +11,7 @@ use crate::{ db::RootDatabase, completion::CompletionItem, hir::{ - ModuleDescriptor, + self, FnScopes, Def, Path, @@ -22,7 +22,7 @@ use crate::{ pub(super) fn completions( acc: &mut Vec, db: &RootDatabase, - module: &ModuleDescriptor, + module: &hir::Module, file: &SourceFileNode, name_ref: ast::NameRef, ) -> Cancelable<()> { @@ -150,7 +150,7 @@ fn complete_fn(name_ref: ast::NameRef, scopes: &FnScopes, acc: &mut Vec, db: &RootDatabase, - module: &ModuleDescriptor, + module: &hir::Module, mut path: Path, ) -> Cancelable<()> { if path.segments.is_empty() { -- cgit v1.2.3