aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/completion
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/completion')
-rw-r--r--crates/ra_analysis/src/completion/mod.rs6
-rw-r--r--crates/ra_analysis/src/completion/reference_completion.rs6
2 files changed, 5 insertions, 7 deletions
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};
11 11
12use crate::{ 12use crate::{
13 db::{self, SyntaxDatabase}, 13 db::{self, SyntaxDatabase},
14 hir:: 14 hir,
15 ModuleDescriptor
16 ,
17 Cancelable, FilePosition 15 Cancelable, FilePosition
18}; 16};
19 17
@@ -38,7 +36,7 @@ pub(crate) fn completions(
38 original_file.reparse(&edit) 36 original_file.reparse(&edit)
39 }; 37 };
40 38
41 let module = ctry!(ModuleDescriptor::guess_from_position(db, position)?); 39 let module = ctry!(hir::Module::guess_from_position(db, position)?);
42 40
43 let mut res = Vec::new(); 41 let mut res = Vec::new();
44 let mut has_completions = false; 42 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::{
11 db::RootDatabase, 11 db::RootDatabase,
12 completion::CompletionItem, 12 completion::CompletionItem,
13 hir::{ 13 hir::{
14 ModuleDescriptor, 14 self,
15 FnScopes, 15 FnScopes,
16 Def, 16 Def,
17 Path, 17 Path,
@@ -22,7 +22,7 @@ use crate::{
22pub(super) fn completions( 22pub(super) fn completions(
23 acc: &mut Vec<CompletionItem>, 23 acc: &mut Vec<CompletionItem>,
24 db: &RootDatabase, 24 db: &RootDatabase,
25 module: &ModuleDescriptor, 25 module: &hir::Module,
26 file: &SourceFileNode, 26 file: &SourceFileNode,
27 name_ref: ast::NameRef, 27 name_ref: ast::NameRef,
28) -> Cancelable<()> { 28) -> Cancelable<()> {
@@ -150,7 +150,7 @@ fn complete_fn(name_ref: ast::NameRef, scopes: &FnScopes, acc: &mut Vec<Completi
150fn complete_path( 150fn complete_path(
151 acc: &mut Vec<CompletionItem>, 151 acc: &mut Vec<CompletionItem>,
152 db: &RootDatabase, 152 db: &RootDatabase,
153 module: &ModuleDescriptor, 153 module: &hir::Module,
154 mut path: Path, 154 mut path: Path,
155) -> Cancelable<()> { 155) -> Cancelable<()> {
156 if path.segments.is_empty() { 156 if path.segments.is_empty() {